I think it's important to note that gambling laws vary from country to country and in the U.S., state to state. And I think in most states in the U.S. it has to be more than just a game of chance. You also typically have to be able to win something of value. The question is, are account-specific pixelated rewards that can't be resold something of monetary value? I don't know the answer to that.
And then you've got a hundred years of collectible cards that have never been regulated, and it would seem that one would have to prove that this is somehow legally different, or both mediums would probably have to be regulated.
I'm not a lawyer, but I think it's a steep uphill battle, and one the government regulators are likely to lose, or more likely just decide not to pursue seriously beyond a public scolding. And even if the games do get removed from store shelves in some countries like Belgium, do they even care much? How are they going to regulate people downloading these games online? Any more than they can currently stop people from actual casino or sports gambling online?
I think game developers/publishers anticipated a possible backlash and decided it was worth the risk because there is likely nothing that anyone can do about it. I think loot boxes are here to stay.