Those are a substantially different economies. For one thing, you end up actually owning something (you often don't even own the software you use the item in for lootboxes). That comes with a bunch of changes, but the most significant is that you can buy things from other players. I can build Magic decks without opening a single pack; I just buy the exact cards I want from other players. That's huge because you never get to a spot where you're spending $1,500 on packs to get that one card you really need. It amortizes the randomness of the packs across a huge group of people, so it can always be had at a specific price relative to it's rarity. Excluding cards no longer in print, which you can't buy packs for anyways.

You can gamble for cards in Pokemon or Magic, if you choose to. If you'd rather, you can hand me a list of cards and I can give you an exact to-the-cent price for you to get those. Loot boxes generally don't have that option. The price is anywhere from the price to get a box up to infinity, period.

You can also simply buy knock-offs. They aren't tournament legal, but nobody cares if you're using a Chinese knock off that you bought for $5 because you didn't want to pay $500 for a legit version.

If lootboxes gave players the option to buy and sell the items contained within, I think things would be different. Of course, that would also kill the profitability. If a casual player gets a really rare item right now, they have no choice but to keep it, and the whales have to keep buying boxes to get that item. If they could sell items, that casual player might decide they'd rather cash out that item for $300. Whale pays $300, consumer gets $300, game producer gets nothing. They could charge a transaction fee, but they probably could have gotten the whale to buy $500 worth of lootboxes trying to get that item.

The fact that duplicates are basically worthless doesn't help either. At least with Magic or Pokemon, you'd be hard pressed to buy a $5 pack that you couldn't resell for at least $1. Your worst case is bounded at a 20% return. It is entirely possible, and not at all rare, to get a lootbox full of duplicates and end up with nothing.

The number of players you contact also makes it easy for them to create items that are common to see, but not easy to get. If an item has a 1/20,000 drop rate, and the average player has opened 50 lootboxes, each player has roughly a 1 in 400 chance of having that item. If a Magic or Pokemon card is that rare, you'll maybe see one of them. It'd take a while to play Magic against 400 people. Meanwhile, in a 25 vs 25 game (or just 50 player for stuff like Fortnite), you'll see it in 1 out of every 8 games on average. That makes it seem like it's not too hard to get, right? You see it all the time.

And lastly, lootboxes are generally cosmetic, while trading cards are usually functional (maybe except baseball cards? I don't know if there's a game that goes with those or not). The rarity of cards can have a substantial impact on how the game plays, to the point where you can absolutely ruin the game by making some cards too rare. Nobody wants to play a card game where the winner is determined by who blew more money on their deck. Again, knock offs help with this.