Spam exists because it works, some small fraction of the population buys what they're selling.
Viruses work because people click on attachments sent to them by strangers and don't apply software patches to their lousy operating systems. Software patches often aren't immediately applied because they might cause more problems than they solve.
People are stupid. I'm tired of it.