Many reasons, mostly related to profit
Some viruses open web pages in the background and click on ads so the website owner gets paid.
Some viruses inject affiliate links when you visit a site so the virus owner gets paid a commission on each sale.
Some virus owners use infected machines to launch DDOS attacks which others pay them to do.
Some viruses steal usernames and passwords which the virus owner can use or sell.
Then you have ransomware which is self explanatory.
Latest Answers