I don't understand why this should be the case. Do the site owners put this stuff into their sites or do other people hack into them and plant it? Of course, I don't understand why anyone would want to plant software that destroys people's computers in the first place, but I take it as given that there are a lot of sick, twisted, worthless, malicious fucks in the world.
No, as I said before, the problem is that they're dickless.
Firefox is a little better browser, but it's hardly "bulletproof". I've still had these sites try to load up stuff on my computer. When I notice suspicious shit happening (like those fake scanner/virus alerts) , I kill the connection (disable it via the control panel or pull the cable) and close the browser with task mgr. IF the malware hasn't disabled it. Some of them will... temporarily.
I use several trojan/malware/virus removers. What one doesn't detect the others usually will. Don't fall for the fake scanner malware that pops up on your computer. Here's some of the REAL software available out there:
Zone Alarm (there's a free version) (zonealarm.com)
Malwarebytes (free) (malwarebytes.org)
Stopzilla (stopzilla.com) (there's a free trial version)
Spybot (free) (safer-networking.org)
Avira Antivir Personal (free) (avira.com)