The “gambling” aspect of CCGs is mostly tacked on by outsiders, though driven by decisions of the manufacturer.
That said, when you have a deck of, say, Pokémon cards in your hand, there’s nothing about it that encourages a gambler’s mindset.
My 8yo has a bunch of Pokémon cards and he just likes playing with them, he has no idea of any monetary value they might have. There’s nothing about the physical product or game itself that betrays that.
It’s the culture created around it that’s poisonous.
The manufacturers are absolutely working to create and profit off of that culture though. For constructed play, booster packs are no different to loot boxes: they only have the effect of increasing and obfuscating the amount of product you need to buy to get the cards you need for a given deck. And they will make very rare, powerful cards precisely because they know it will move boxes.
The games themselves are fine: if, for example, you could just buy specific cards from the manufacturer, fixed price, print-on-demand (and also buy packs for e.g. draft play), then I would have no problems with the business model at all, but it's the sales model that is predatory.