Well, you are assuming that the company is valueless when you say that. Most companies are not valueless. Most, in fact, make a profit, and as an investor you own a piece of that profit. The profits are not a phantom... that's cold hard cash and it means something whether the company has a dividend or not. It's very real.
Many people treat the market like a game, and there are some game-like elements to it, but the underlying reality is that it isn't a game. The secondary markets have many uses... it is the liquidity and transactional efficiency of the secondary market that gives U.S. industry a level of flexibility that no other country can compete with. our energy infrastructure, renewables industries, small businesses. When the world changes, dollars flow where they are needed.
By dismissing the secondary market you basically dismiss any need for liquidity. You are wrong. The markets aren't about giving people a free pass... it's survival of the fittest. If anything, investors have it the easiest. We can shift our resources literally in a few seconds, and other than the crash of 1929, no crash since has lost investors who stuck with it any money in any reasonable period of time unless they were stupid and sold at the bottom (not understanding what stock ownership actually means).
Look at a graph of the 2008 crash. The economy might have gotten screwed due to the lack of regulation of the financial industry, but the markets recovered relatively quickly and that happened because the efficiency of the secondary markets allowed investment resources to be shifted very quickly. Just looking at tops and bottoms doesn't give you a full picture... very few investors actually went 'all-in' at the top and sold 'all-out' at the bottom. No matter how hyped-up a story you get from the media, it isn't an accurate representation of what people actually made or lost.
If you think the stock market is a crap-shoot then you are probably thinking a bit too short-term. It's never been a crap-shoot. Not even during the 1929 crash.
-Matt