The stock market is absolutely related to the economy. It tells us how well the listed companies are doing. If investors are confident, then they will buy equities. Even if the economy is in a downturn, the stock market indicates faith in the capacity of the economy to recover.
I admit, in recent years (mostly 2008 onward), the U.S. stock market patterns have not been based on fundamentals, i.e. financial reports, revenues, actual growth potential, etc. A lot of it has been based on hot air. I think a large part of this has to do with accessibility. You used to need a stock broker to participate and now it's all online, giving access to the average joe. The result is that there is less expertise playing the market, so the market largely no longer represents people who did proper research before buying stocks.
Government stimulus has created a bubble of sorts, by propelling us into the next cycle of bunk investing. It causes prices to rise which lets people profit, and then when the market collapses those profiteers buy up everything at cheap prices again. This has been the cycle since 2008. Rinse, lather, repeat. I would argue that the cycles are "designed" to transfer massive amounts of wealth to the 1%, but it lures the general public to participate based on faith -- and really, that's all the economy rests upon at the end of the day, is faith.
Which is why, despite the obvious flaws, I would not conclude that the stock market is totally disconnected from reality, the reason being that it still shows people's willingness to cast their lot, and right now the numbers are pretty good. For now, we are okay. My main concern is how the Fed is going to deal with its massive debt burden. That's an incoming train wreck.