Loot boxes are not gambling according to the ESRB
http://www.pcgamer.com/loot-boxes-are-not-gambling-according-to-the-esrb/
Randomness is an inherent aspect of any videogame loot box: Maybe there's something good inside, or maybe you get stuck with something you've already got 16 copies of. But you do get something—and that, according to Kotaku, is why the ESRB—the Entertainment Software Rating Board, which categorizes games released in North America from "Early Childhood" to "Adults Only"—does not consider them to be a form of gambling.
"While there’s an element of chance in these mechanics, the player is always guaranteed to receive in-game content (even if the player unfortunately receives something they don’t want)," an ESRB rep told the site. "We think of it as a similar principle to collectible card games: Sometimes you’ll open a pack and get a brand new holographic card you’ve had your eye on for a while. But other times you’ll end up with a pack of cards you already have."