And then there are outright scammers, too.
Threats come in many forms, but malware, ransomware and Trojans are generally designed to either steal your data or do enough damage to your system that you'll pay a high price to reverse the effects. The way that viruses behave and their end goal has changed over the years, but generally the purpose is to rob you of your money.