Just to play devil's advocate on this, the money in the stock market (i.e. any stock transaction outside of a public offering) is generally not being invested in companies that actually build things, it's getting stored.
Hm? In the stock market, you pay a current stockholder for their share(s). The company sees no money from the transaction. It sounds like what you're thinking of is banking, which is something different.