Well it's simply because Kishimoto wanted him to die. First, had Nagato lived, most of the Hidden Leaf isn't like Naruto - they wouldn't forgive Pein. It's similar to the Sasuke Situation with Naruto and maybe Tsunade being okay with keeping Nagato alive while the rest want to find the man and kill him. Second, Nagato was extremely powerful for his time. Nobody in his time can compare - heck, Obito at the time couldn't compare to Nagato's Strength. He wanted to "join" Jiraiya and Yahiko in the after-world and he had to die - he had the life-flashback and everything! In addition, Obito needed a power-up and if Nagato lived, he wouldn't have gotten the Rinnegan and would not be anywhere near as intimidating as he seemed during the War.