If Vader didn't die saving Luke from the emperor, life would have been
very awkward.
First off, Luke has to explain why the Rebel Alliance should be okay with who he has with him.
Also, Luke has to go to the cybernetics doctor who gave him a new hand and ask her to fix Darth Mahrlect Vader's hand!
Doctor: "So you want me to do a medical procedure on the galaxy's second worst villain because he killed the galaxy's first worst villain?"
Luke: "Yep"
Doctor: "And did the emperor take off Vader's hand."
Luke: "No, that was me."
The father-daughter dance at Han and Leia's wedding would awkward.
I can imagine an awkward toast. "Sorry about the whole torturing you thing, but I'm really happy to have you as a son-in-law now."
At a certain point in villainy, to have a redemption, the character must die for the audience to be okay with this.
I thought it was interesting in the Expanded Universe that Leia had to resign from the New Republic Senate once it became widely known that her father was Darth Vader. They actually tried to keep that part quiet.
Luke told everyone that Vader killed the emperor but he didn't name drop Anakin Skywalker. The fact that Vader killed the emperor didn't win Vader any new admirers. Given that the Death Star blew up like 10-20 minutes after this and the galaxy at large was unaware of Palpatine using the Force to push the men in the imperial fleet, no one thought Vader's betrayal altered the course of events.