Ah, but those are ads that are built into the game itself. That's the developer doing that to you, not malicious code found "in the wild" on the Internet.
Of course, it could be argued that it's the same (vicious code)

- but still, it's two different things.
As to why it would be difficult for the iPad to get a virus - it's because viruses, by definition, spread themselves by compromising program after program on a computer. However, on the iPad, apps can't talk to each other (other than to call forth one using the "Open In..." function). So, since the apps can't talk to each other, unless you specifically ask them to (by using the open function), they can't spread a virus amongst themselves. it's the [in]famous "sandbox" security that Apple has developed.
Then, there is the fact that the only place to get apps is the App Store. Those apps are rigorously vetted to make sure they don't contain malicious code. Granted, one could slip through, but it would be rare (and probably quickly dealt with).
Granted, those of us that jail break don't get our tweaks from the App Store, so there is a bit of "danger" there. However, as long as we stick to the trusted repositories and download only the tweaks that are from reputable coders, we're very safe. If jail breakers were to get malicious code from one of the trusted repositories, the community would be up in arms, same as if it happened at the App Store. So, I'm confident my iPad is just as secure as a stock one.
Of course, if a jail breaker wanders off into the piracy related areas and starts downloading stuff willy-nilly, well then, he or she runs a much greater risk of contamination. But, since I don't like pirates (thieves) anyway - I'm okay with that.
Again, as was said, this doesn't mean the iPad can't get a virus or malicious code. It just makes it very difficult. So, for now, we (stock owners and jail breakers alike) are pretty safe.
There, probably more than you though you wanted, eh?

Hope it helps/clarifies.
Marilyn