In security space companies can profit from selling corporate products backed by a threat-detecting network of free personal users. The sooner they can see new malware, the sooner they can make and distribute its signature, the safer it is for their corporate clients, so everyone wins.
Also, avast, avg, etc are just another source of vulnerabilities themselves.
Everyone really should be taught in school to ask: 'how do they profit off of me?'.