Non-market societies (like ancient ones) had a small group of rich but the the bulk of people were poor. The rich in non-market economies had little outlet for their wealth except consumption. In market economies, however, the rich can invest in capitalist production, which generates even more wealth. The bulk of the wealth from the greater productivity of capital capacity , however, goes to workers. The capitalist earn only the rate of return on their investment, but the workers earn the value of what their labor produces, which is greatly enhanced by capital goods. Since the rich in any society are a small minority, entrepreneurs in a market economy will cater mainly to the bulk of workers, who are middle-class.
Take a look at chapter 15 in Ludwig von Mises’s book, Human Action:
http://mises.org/books/humanactionscholars.pdf