Why Dobby died in the Books - To give Harry enough strength to lock Voldemort out of his head.
Why Dobby died in the Movies - Shock value?? There's no mention of Harry being able to lock Voldemort out of his head now??
Why it's still stupid -- Sirius (who shouldn't of died either) or Dumbledore should have been enough grief/love for Harry to lock Voldemort out of his head for good.
I know Harry locked Ol'Voldey out of his head when he tried to possess him in Order of The Phoenix [Which, I think the movie version was better than the books during that scene] after Sirius died, but that death should have been enough of a push for Harry to start to be able to choose when he sees what Ole'Tommy Boy was feeling/seeing.
[also, I like Dobby's burial and grave scenes better in the books, more emotional]