As has been mentioned hashing the entire file is ineffective for a few reasons.
Its (slightly) computationally more intensive, so why do it if you can avoid it?
Some viruses are polymorphic, hence any slight change can make them undetectable via this "entire file" method.
It's actually relatively rare to get a malware executable individually. The vast majority of the time it will be bound with another executable, meaning again we go from one specific virus to thousands of varients depending on what file its bound to, again making it rather pointless.
A final out that I'll outline is really the point of making it (at least a little more) difficult for malware authors. If I had a file with a heap of junk at the beginning, heap of junk at the end, but one central very specific malicious part in the centre which does the bad stuff and is hard to rewrite in a different way, I want to identify that in every file. Then no matter what junk they put before / after they still have to find a new way to rewrite this key section which may be a lot harder than morphing some junk.
Think of it this way, if I wanted to find a key phrase such as "Security StackExchange" on a webpage - should I search for that phrase specifically? Or find a page that contains it and just search for copies of that page? That's essentially the difference between searching for a specific virus signature (phrase) vs hashing the program (whole page).
It's worth noting a lot of these things have been grossly simplified for ease of explaination.