What makes gambling a problem is it's link back to real world consequences and addiction / compulsion cycles. Playing a card game with your friends is fine. Playing a card game where you bet your car or the deed to your house is a problem. There's a reason why gambling is regulated.
Once money gets into the mix is where problems start. You can use money to gamble for loot in the same way you would gamble for a payout in a casino. The designers of loot box systems implemented them using the same psychological conditioning techniques used in slot machines to further hook players and convince them to part with their cash. Developers KNOW that they are addicting which is why they are in there in the first place. They aren't ignorant on the matter.
The accessibility of online games to people is also a problem. At least in a casino you have to be 21 to enter and you have to go to a specific location (in most cases) to gamble. Even online gambling you need an ID and a credit card / bank account to gamble. There's not much of a barrier when it comes to video games as you can go to a convenience store, purchase a PSN, XBL or STEAM card to pay for your habit with cash. Or borrow a parents credit card.
The legal definition of gambling is also how gaming companies have skated the laws in the first place. They aren't adequate enough to protect consumers from predatory business practices and so game companies have designed these systems to ride the edge of what would constitute legal gambling as to avoid legal penalty. It's very obvious what developers are doing, and its very obvious that they know what they're doing.
There needs to be regulation and discussion on the matter for sure because it's pretty much tainted the entire industry. IT was always going to be a matter of time.