Gambling in contrast is strictly zero sum at best and always negative sum in reality. A group of people puts in 1x capital, the house takes a cut of that, and then the <1x gets unevenly redistributed and that's it. Nothing is generated, the collective set of people is strictly worse off after the gamble, with a few making gains off the backs of loss distributed amongst everyone else. All while hacking dopamine reward centers that didn't evolve for that.
It appears to be the case that we can't perfectly stop 100% of all IRL gambling without a cost that exceeds the benefit. That's life. But that doesn't mean we shouldn't be picking as much low hanging fruit as possible, same as with other negative sum brain hacks.
Unlike sports gambling or casinos, the stock market actually does have some legitimate utility, as compared to being (at best) pure entertainment.