Same reason theres antivirus software for Macs.
I assume by that answer you mean, to detect windows based malware. And yes, that command does (or did) have that ability. But before Windows became popular, business *nix OS's were the main target and unlike what you stated, had virus problems.
Yes, certainly not as bad as Windows has the problem, but that is the price you pay for being >90% of the PC marketshare and it isn't the point either. You claimed *nix has no viruses or is immune to viruses. Untrue.