You're the parent. The buck stops with you. I personally don't think children should spend money "gambling" on loot boxes, but If you can't stop your own child from doing it what makes you think the government will be able to? The government is not some infallible entity that can magically solve problems like so many people seem to believe. And even if there weren't any games to gamble on there are still a million other ways to gamble including just getting together with other kids and playing poker. The only way to stop your kid from gambling is teaching them, just like it's the only way to stop them from doing drugs, or being a bad person in general.
I also wouldn't be too hard on kids for spending money on something virtual instead of real physical items. It really isn't much different than spending money on real life collectables and decorations, spending extra money on fancy clothing instead of plain cheap clothing, spending extra money on a luxury vehicle instead of a cheap vehicle that works perfectly fine, expensive food, etc. When it's a game someone plays for thousands of hours they're likely getting a lot more enjoyment out of $100 spent on things in the game than some physical item for entertainment. However, teaching responsible spending and saving money for the future is definitely important.