Anakin Skywalker's (Hayden Christensen) turn to the dark side at the end of Star Wars: Episode III — Revenge of the Sith still wasn't enough reason for Obi-Wan Kenobi (Ewan McGregor) to kill him in Mustafar — why? After the success of the original trilogy, George Lucas continued the franchise by exploring the backstory to the original trilogy with the prequels. The films chronicle Anakin's journey to becoming a Jedi, only to be corrupted by Emperor Palpatine (Ian McDiarmid) and eventually transforming into Darth Vader.
While Anakin's life was defined by a series of tragedies, he also had some wonderful moments thanks to the relationships he made before becoming Darth Vader. Of course, there's Pé Amidala (Natalie Portman), whom he'd married and had the twins Luke and Leia with. But, another important connection he had was with his Jedi Master and friend Obi-Wan, who maintained a close dynamic with him until he started to be consumed by his crippling fears about losing Pé. Obi-Wan was the last person to see Anakin before he officially assumed the persona of Darth Vader, and knowing full well that his old friend had already turned to the dark side, it's curious that he didn't decide during their emotional battle in Mustafar to end him then and there when he had the chance.
It's no secret that the Jedi botched their handling of Emperor Palpatine's rise. The fact that Darth Sidious was operating stealthily under their noses was arguably their biggest failure as a governing body. In hindsight, Obi-Wan may have effectively derailed the Sith's evil plans to create the evil Empire had he killed Anakin, leaving Emperor Palpatine without his planned sidekick who mostly remained loyal to him until Return of the Jedi. That said, it's also understandable why he couldn't bring himself to kill Anakin. Firstly, executing an already defeated enemy contradicts the Jedi Code, and Obi-Wan was a stickler for those rules. He was so committed to the cause that he was willing to sacrifice his own happiness to adhere to it as seen with how things played out between him and Duchess Satine Kryze. Even Anakin mentioned this after he gave into Emperor Palpatine's egging about killing Count Dooku (Christopher Lee) and when Mace Windu (Samuel L. Jackson) was about to strike Darth Sidious earlier in Revenge of the Sith.
Secondly, Obi-Wan and Anakin had a great friendship. While it started off as a mentor-mentee relationship, it developed into almost a brotherhood as they found themselves subjected to numerous tricky situations during the Star Wars prequels with no one else to rely on but each other. Without Emperor Palpatine's ministrations and the Jedi High Council's neglect, it's safe to say that Anakin would've been more comfortable talking to Obi-Wan about his anxieties. The fact that Obi-Wan devoted the rest of his life looking after Luke in Tatooine meant that somehow, he's still concerned about the welfare of Anakin's kids — despite his falling out with their father. If anything, the battle in Mustafar made it very clear that fighting off Anakin was very painful for Obi-Wan, but unfortunately, the former was just too far gone to be redeemed at that point.
Whether or not Obi-Wan leaving Anakin alive, albeit without limbs, in Star Wars: Episode III — Revenge of the Sith was the right decision considering the threat that the Jedi were facing is still up for debate. In his defense, he probably didn't anticipate Emperor Palpatine saving Anakin on Mustafar. His choice, however, highlights how he would always choose the morally-correct path, which makes him one of the best characters in the franchise.