Having your search history and internet-browsing habits collected and sold may make you uncomfortable, but antivirus software goes a long way toward keeping malware out of your computer and fending off ransomware, phishing attacks, and other threats.