Most vulnerabilities are unrelated to the actual OS stack and exploit other stuff. In that particular case is even wrong to say it was a "Mac virus", since it was a Java exploit and could have affected any system with Java installed. The point is that it remained unpatched for too long on Apple's Software Update.