This is a very interesting topic for me as I often wonder about the same.
I think the concepts have similarities but also are different in some ways. Why? Well, there are some high-risk investing practices and volatile stocks. In this case, I agree that investing is pretty much identical as betting or gambling. You give your money without having any idea what the outcome will be. Plus, as some of you said, the stock market is often an unfair place to be, and people with small budget can easily lose everything if they can't afford to wait out periods when the stock prices go down.
On the other hand, I'd say there are the stable stocks like Microsoft for example that generally move in a positive direction and give dividends. So, you get there in order to slowly grow your investment and possibly save money for retirement or whatever. I wouldn't place these investments in the same basket as betting and gambling. Sure, there's always the chance that something will go wrong. But still, I think these chances are small and if you read the news etc. you can probably react in time to cash in your profits.
So, my overall opinion is divided in half. If you buy new stocks and see what happens or invest in volatile stocks like Tesla that can easily grow by 50% but also drop by 60%, you are gambling in a way.
Also, to me the main difference is what money you use for investing. If you invest your retirement fund in stable investment opportunities hoping to slowly grow it, then I wouldn't say you're gambling. If you get some $5,000 you are ready to lose and just want to see what will happen by investing them in some new stock that can prove awesome or terrible, then you're gambling. You can easily decide to bet those $5,000 on a football match or place them on red on roulette and see what happens. If you are ready to lose the money, you are always gambling.
I don't know if this makes sense to you.
It makes sense and we see this in the market as well, the majority of the money is invested in bitcoin and if you invest in it with the intention to hold for the long term then you are not really gambling, but if someone invest in the 997th coin in the market thinking of becoming rich then that person is gambling no matter what they say, the confusion is also exacerbated because they both borrow terms from each other and this confuses people about both being the same when in fact they could not be more different.