Karl Marx, who was the most perceptive analyst of how capitalism works, referred to the fundamental contradiction in capitalism. That contradiction is not difficult to understand. Consider that the business of capitalism is commodity production. In Marx' analysis, the capitalist takes a sum of money that we call capital, M, and uses it to buy materials and hire workers to turn those materials into commodities which we call C that the capitalist can sell at a profit. Those profits can then be used to increase capital and thus expand or to pay the personal expenses of the capitalist, which as an enterprise grows bigger become a smaller and smaller part of the profit. Marx denotes this as M – C – M'. The point is that M' has to be greater than M. Otherwise, there is no profit, and the enterprise cannot continue.
If we consider the whole society, we can add up all the wages earned in that society, and we can add all the prices of the commodities produced. The sum total of the wages has to be less than the sum total of the prices of the commodities. Therefore, there are not enough wages to pay the prices of all the commodities. That is what Marx called the fundamental contradiction in capitalism.
Of course, other things are going on. Capitalists invest some of their capital to make production more efficient. That allows them to increase quality and lower prices. Enterprises unable to compete at that inevitably go out of business. There is also financial capital in which no commodities are produced, such as lending money for interest. Marx refers to that as M – M', in which again M' is greater than M. But that does not change the fundamental contradiction.
For obvious reasons then, the drive of capitalists is to increase profit, a feature that can be simplified as greed, which is the underlying motivation in capitalism. Profits can be increased by raising prices (monopolies are able to do that) or by decreasing the cost of production or both. The primary way to do that is to decrease the amount of capital spent on wages, whether by replacing humans by machines or by paying workers less. It is easier to lower wages than to lower the other costs of production, such as materials. Of course, if prices rise and wages do not, that achieves the same effect as lowering wages.
So, how does economic inequality fit into this analysis? The larger the gap between the wealthiest people and the rest of the people in the society, the less money the latter have to buy commodities. That sharpens the fundamental contradiction.
There are other factors at play, too. For example, you pay workers not only to provide food and shelter that workers need to be able to continue working but to reproduce themselves since workers do not live forever. So wages have to be sufficient to raise children, to educate them so that they will be competent workers, to provide them with healthcare when they need it, and thus to reproduce the work force.
We are seeing a major breakdown in the reproduction of the work force. For example, many students have to take out exorbitant loans to finance their educations, often without a prospect of finding a job with wages large enough to pay off those loans. We have increasing numbers of people who cannot afford housing, even if they have jobs. We have large numbers of people who cannot afford healthcare.
Thus the growth of economic inequality threatens the ability of capitalism to reproduce itself, and when that happens, the system begins to collapse. This may all sound very theoretical, but it is precisely what we are living through now.