In the case of gambling almost 100% of gamblers are doomed to lose their money in the long term, that is at least 10% worse than trading as an option to profit from speculation and randomness of the markets.
In this case, it is necessary to recall that gambling is primarily aimed at entertainment and this differs from trading, where the main goal is to make a profit. So gambling losses should be considered as a payment for entertainment.
That's right, although both of these things have the same side in terms of finance, whether it's profit or loss, but the loss of this gambling is indeed as you said, with another example, maybe we spend money to buy tickets and watch movies, not much different from paying for entertainment.
It's just that maybe this gambling has more impact or is more negative, as well as many people's views that do see gambling as a negative thing.