actual gambling is different cause theres an expectation to pay money to make money. the closest lootboxes get to gambling is in csgo or tf2 market trading, and even then its very obvious theres no realistic way you can make back what you spend with those games. maybe csgo, idk.
lootboxes are different cause the purchase isnt intended to make yourself money - it hits the same nerve centers in the brain, but since theres the implicit and explicit understood difference that you’re purchasing a virtual item, the association made of spend money to have a chance at making money isnt made. the majority of games with lootboxes do not allow you to trade items, and as a result there is no implicit suggestion that people have a chance of making their money back by selling their rare item