Gambling is at least ok in my book because it's only legal for adults and in specific, regulated locations. It's still fucking idiotic behavior to engage in, but whatever, adults can waste their money, I don't really care. It's easy to avoid unless you live in Vegas.
I'm sure I'll alienate most of the user base here, but anything that involves turning money into 'pulls' should be illegal for minors, and honestly probably just entirely. Magic, Pokemon cards, blind boxes, the stupid Lego minifigs I love to collect. Ban all of it, it's bad for our psyche, it's wasteful, it's anti-consumer bullshit that should never be allowed. If you can't make money selling your product directly, then you don't deserve to run a business.
You're right though, the gambling analogy perfect. I doubt paid loot boxes are significantly worse than letting children gamble. But still, there's a reason we don't let children gamble, and loot boxes certainly aren't any better.