This premise of constrained optimization, that is, choosing the best from a limited budget, is combined with the other major workhorse of economic theory, that of equilibrium. In competitive markets where prices are free to move up and down, those prices fluctuate in such a way that supply equals demand. To simplify somewhat, we can say that Optimization + Equilibrium = Economics. This is a powerful combination, nothing that other social sciences can match.