Many of the things that are most valuable in life are not things that can be traded on the market. Love, friendship, the respect of your peers, and a sense of belonging are all incredibly important parts of life, and they’re also impossible to incorporate into economic analysis. Now, since they’re not economic goods, it normally wouldn’t be a problem that they aren’t subject to economic analysis. Unfortunately, economists have not been content to restrict themselves to economic goods, but instead attempt to provide analysis of public policy choices using economic methods.
The formalizing of self-interest as an economic principle was largely the work of Francis Edgeworth. It is sometimes wrongly traced back to the work of Adam Smith. While Smith wrote about self-interest, he actually had a much, much more nuanced view of both when people would behave out of self-interest and when self-interested behavior could be good for society then he is usually given credit for. (He most certainly did not claim either that individuals are always self-interested or that self-interest always leads to optimal outcomes, and cited limits to self-interest in both Theory of Moral Sentiments and Wealth of Nations; see here, here, and here for more on the misinterpretation of Smith.