I don’t think it’s fair to compare it directly to gambling, as in actual gambling the odds can’t be changed dynamically while you play to increase addiction.
Loot boxes are purely "luck" based gambling, where your "luck" is dynamically altered based on how much the operators are get you addicted. Including occasional "free" rewards to encourage you to buy more with actual money.