1. You can construct portfolios of derivatives that are almost equivalent to holding the underlying except at a smaller initial cost. This gives you nothing but flexibility in ownership.
2. Remember that fire insurance is also straight up gambling that your house will burn down. Gambling counter to your interests is what we call insurance, and the proper mix of underlying and derivative is a hedged, lower risk portfolio than just the underlying.
Except in very rare cases stocks are entirely based on what investors think someone else is willing to pay in the future.
Of course stocks are based on what investors think they’re worth. Thats the whole point. It’s not gambling. Tesla is worth a lot of money because people think it is. If you’re susceptible to fomo hype trains and looking for a quick buck, you’re looking at the market as a slot machine, no doubt.
Stocks pay owners other than their value in the market, too. Capitalists look to make money off the market. It doesn't mean it’s all gambling. That’s a little reductive.