There was a time when the stock market actually served capitalism (and society) in a way that benefited society at large. That time has long since passed however: now the market is nothing more than a playground for those with a lot of $$ and time on their hands. If you actually believe it is more than that… well, read on.
There was a time when stocks, and the market, served a functional purpose. Namely, if a company needed capital to build a new factory, upgrade equipment or otherwise purchase durable goods that company could issue stock. Essentially stock is a contract between a lender and borrower that says "you give me some capital, and I'll repay you out of the profits I make". Usually, that included the paying of dividends. Lenders also hoped the value of the underlying "stock" increases as the company grew and succeeded in the market.
None of that is relevant today. Please try to think of a company that has issued stock to finance a purchase of durable goods… or any purchase. Most stock IPOs are simply a way of realizing value for the shareholders who started the company.
And if you actually think stock prices are actually tied to corporate performance just track a sample of stock prices vs earnings to see what I mean. Stock prices aren't set by corporate performance – they are set by investor perceptions. Remember Amazon, Yahoo! and a host of others (not just tech co's either)? They didn't even plan to show profits for years, yet people were willing to BET that the investment would be worth something. That perception alone drove the prices into the ridiculous range.
Now the entire economy is held hostage to these markets… And those markets are driven not by actual performance of the underlying companies – you don't even hear analysts talking about that – the markets are driven by investors' perceptions.
The system is based on a delicate house of cards held together by money-brokers who decide for themselves when the market will rise or crash. Like any pyramid scheme, when enough of them decide its time to take profits, the pyramid scheme collapses leaving a few holding the bag. After a bit, they come back in, start hyping new companies and the cycle starts again. Again, like any good pyramid scheme, it depends on a continual supply of folks will to believe the hype, jump in the game and hope they aren't left holding the bag.