There is a distinction between lootboxes with tradable items and those without, if the items are tradable it is literally gambling. But yeah, sucky either way
It's not the trading, it's the paying money for lootboxes.
Plenty of roguelikes/roguelites have loot boxes, but they randomly generated chests you open by defeating bosses, not by pulling out your credit card