The stock market was caused by stock market speculation, over production of goods, an unregulated banking system, and unprotected consumerism.
If reform was not done in the US to fix the stem problems leading to the Great Depression, then a depression would happen again. The country wanted to prevent a depression like that from ever happening again.
Many of the New Deal programs dealt with reforming the banking industry and putting regulations, laws, and protections into place to protect people's money. The stock market was also regulated with the Securities Exchange Commission created to watch over the stock market.