Unless you specifically invest your money somewhere else, such as realestates, bonds and gold/metal. Many cases you really cannot avoid. Let's say you put money in the bank CD. The bank could use the money to invest in whatever way they want. They may buy bonds, stocks and do some other trading.
As long as stocks are undervalued, there will be someone buy them.