The gaming industry has moved away primarily because legislation has been getting passed in countries like Japan and China forbidding lootboxes in games. It's been a hot topic off and on in Congress and Parliaments around the world for a few years now and I assume game developers are (of course) skittish about it.
To your point about cosmetic-only though, that still exists. Rocket League, which I play regularly, gives out boxes you open and get a random cosmetic with varying degrees of rarity. You can get a net larger amount of these cosmetic boxes by paying for the Rocket Pass premium (something like $10 a season). But the loot boxes only ever contain skins, wheels, etc.