Well, currently, there is no answer to this question.
Lately, there has been a much-heated debate about this very question. Some organizations and individuals have compared loot boxes to gambling. Due to the way games are age-restricted, those people have accused game developers of exposing minors to gambling.
Game developers, generally, tend to compare loot boxes to other products like “Kinder Surprise,” “Hatchimals,” and “LOL Surprise,” and avoid any comparisons to gambling.
However, generally, loot boxes only give in-game items which have no actual value other than to the player. The only flaw with that thinking is that certain games which contain loot boxes also have online markets where you can sell your items for real money, which additionally complicates the issue.
In essence, the regulation and lawmakers are drastically behind the times and are trying to catch up with gaming.
Basically, loot boxes aren’t gambling… yet.