They also don't use pure randomness. They very finely tune the way the drops come out. If there's a card you don't have (or that you don't have much of), there's a MUCH higher chance of finding it than a card you've maxed out, or that is at similar level to the rest of your cards.
Most loot box games have this as a general concept because pure randomness ensures that the chance of getting a new unique item from a finite set decreases for each new item you get, but Clash Royale compounds this by geometrically increasing the number of each thing you need to get to upgrade it.