Most games contain calculated random rewards or else the game would be boring and predictable. However to call this gambling it's quite a stretch as you can't cash out. Whoever decided to make those "boxes" look like slot machines spinning brought it upon themselves.
I can't distinguish a loot box from a scratch card -- except a scratch card must reveal odds.
I'm old-school in terms of paying for games: £xx for a complete game, £x for a month's access as they provide a known value exchange. Doubly so when it's the underage being sold to. My kids learnt never to ask - my answer was always no. Lootboxes and other variable rewards, time unlocks and so forth are just a piss-take driven by sheer greed of the GameCo that's ruined many games.