But then it occurred to me, it's not the card/usb-stick the dogs are smelling, it's the fact that some human touched it
No, the dog simply smells the chemicals in the device - Hell, if we can smell them, so can a dog. We just can't smell them well enough to find one hidden inside four containers at the back of a filing cabinet, whereas a dog can.
To your other point, however...
There's no way the dog can smell certain memory cards with certain content on it
Absolutely true, but largely irrelevant. They had a warrant to seize storage media, plain and simple. The dog just helped them find all of it.
That said, I still see a dog alerting to the smell of electronics as increasingly useless in the modern world. Assuming no malicious intent on the part of the handler (false, but let's roll with it for now), a drug dog can sniff out your bag of weed precisely because you don't have hundreds of bags of hypothetically-legal weed hidden around your apartment and they need to find the one illegal one. With electronics, however, I do have hundreds (possibly in the thousands) of circuit boards randomly scattered around my house - I'd dare say that even Joe Sixpack easily has over a hundred boards around the house, when even things like car keys and teddy bears and thermostats have them nowadays.
So while the police might love cataloging 150 individual drug charges for every seed they find in your carpet, they won't take quite the same sick pleasure in documenting your three computers, your smoke detectors, two external HDDs, your TVs, 18 thumbdrives, random old PC parts you have lying around, a third of your kid's action figures, your vintage SNES and dozens of games, a few hundred burned DVDs... And then someone actually needs to check out almost all of those to decide whether or not they have any storage capacity, and if so, what they contain? In all seriousness, if they raided my house for storage media, even narrowing it down to "real" storage devices (HDDs, burned DVDs, flash drives... as opposed to every recordable greeting card etc), someone could literally spend the rest of their life trying to decide whether or not they had found anything incriminating in the collection.