Well he did in the book, so I'm pretty glad he did in the movie as well :)
Besides, we can't have Harry and Ron and Hermione and Dean and Luna and Griphook and Ollivander die. Someone had to save them all, and Dobby, although he लॉस्ट his life doing so (I cried so much!!!!), he did a pretty amazing job, and earned the adoring respect of प्रशंसकों around the world, and will not have died in vain. RIP Dobby, A Free Elf <3