A lot of people have criticised Vader's appearance in Rogue One as being needless. And while I was able to justify his assault on the Rebels, I initially felt that his appearance on Mustafar wasn't necessary as it doesn't really contribute to the plot - and this is true.

But I just realised that that scene does establish something else that contributes to A New Hope -- just how bitter his hatred towards Obi-Wan Kenobi had become. By living at the site where Obi-Wan nearly killed him, Vader is constantly reminded of his defeat which would continually fuel his obsession with wanting to kill Kenobi. Whether the Emperor chose for Vader to live there or if Vader himself chose to live there in order to further feed his own rage is not known, but the result is the same.

This explains why Vader is so keen to immediately hunt down and kill Obi-Wan when he felt his presence on the Death Star. And why there wasn't any kind of emotional reunion between the two characters - no argument, no sustained conversation... just Vader telling Obi-Wan how he's been itching to finish their fight that they had 20 freakin' years ago. And he didn't order any Stormtroopers to accompany him - it had to be one on one because this was such a personal fight for Vader.

Okay, Vader's interaction with Krennic wasn't really necessary, but it allowed the story to show us how Vader lives, which in turn helps to flesh out (no pun intended) Vader's character and motivations. And we know that the ending of Rogue One explains why Vader's so urinated with the Rebels at the beginning of A New Hope, because those Rebels (including Leia) are trolling Vader so hard!
"Where are the plans?"
"Plans? Dunno what you're talking about, dude. We're a diplomatic mission."
"Pig's bum! I was literally chasing you guys with the plans at your door just an hour ago!"


And the Mustafar scene also helps to further explain why Vader is so obsessed with Obi-Wan Kenobi two decades after their fight. We even see Grand Moff Tarkin in ANH basically tell Vader, "Seriously? Just let it go." - but Vader can't. Mental health practice tells us that the standard way of dealing with trauma is diversion therapy. It's not like in movies and TV shows where people are made to recall their traumatic events (that does happen if they have to testify as a key witness in court, but this is also why this kind of testament is really difficult for victims as it's causing them mental anguish and goes against the healing process; worse still when cases drag on and the witness needs to testify multiple times ). As far as treating patients are concerned, treatment focuses on getting them to basically stop dwelling on unpleasant events and think about other more positive things. In other words, to get on with their lives. Aside from his suit being a permanent reminder of his greatest defeat, living in proximity to where it happened would possibly be an even bigger and constant reminder. Imagine if a victim of the Boston Marathon bombing who had to have limbs amputated were to live in a building just across the road from where the explosive had gone off. And they were socially isolated - no friends, no family... just looking out the window at the site of that horrible event every day. It would drive you insane... and this explains Vader's state of mind and yeah, his obsession with Obi-Wan must've been part of this insanity.