If it didn't, malware devs could just send malware zipped in a password protected folder with that password and tell users to enter that password to unzip.
GMail does some really interesting analysis on e-mails. It even somehow managed to detect and block a file I wanted to send demonstrating a dcraw parser bug in a really obscure camera RAW image format.