“Lots of ordinary financial things are gambling,” says Robin Hanson, an economist at George Mason University. “But they are carved out in the public mind.”
Life is playing. Everything you do is an investment of some type - time, energy, emotion, money. Every decision you make is "betting" of a kind, it just depends how you decide to dress it up.
If I invest emotional energy in a friendship, that's certainly a risk which might not always pay off. But unlike playing horses, no one else has to lose in order for me to win.
The lines can seem fuzzy in practice, but it does make good sense to reserve the term 'investment' for deploying resources, with the hope of gain, in domains where a net-positive-sum outcome for all is possible.
Meanwhile, pure 'gambling' reshuffles value in a net-zero-sum or even net-negative-sum process, and in many cases only persists because some participants ('suckers', 'marks', 'degenerates') have equally-persistent behavioral/decision-making problems.
Another related dimension-of-distinction is whether the randomness is an inherent product of a chaotic/complex/natural process, or synthesized precisely with intent to confuse.
Coming to understand (and either control or hedge) the randomness in nature or in complex hard-to-predict systems can be a very positive-sum process, and even generate spillover benefits for others (positive externalities). But engineering a game with fixed completely-deterministic odds, rigged against most players and (designed-to-be) just beyond the ability of their usual rules-of-thumb to model, is essentially predatory.
People generally shouldn't play such games, or confuse them with the other more-reasoned 'bets' made in other domains. Of course people will sometimes make the 'bad' bets, because they're not always easy to distinguish and everyone has to learn. But the end of that process would ideally be to better discriminate between kinds-of-bets, not to lump them together as 'all just gambling'.
Insurance, I'll grant, is a bet, but it's a bet where you have skin in the game - a bet against yourself, to hedge against loss outside your control. A bet you want to lose.