Economic theories are based on rational economic decision-making, i.e. economic decision-makers will act in their best self-interest. We assume that consumers will seek to spend their money in such a way as to maximise their total utility. Producers will seek to maximise their profits.
The thing is, people are not always rational!