One of the big plot holes in the first two Star Wars trilogies was the fact that R2-D2 served Anakin from the very beginning to the end but didn’t think to tell Luke that Darth Vader was his father.
R2-D2 witnessed almost every pivotal moment in Anakin’s life. From his early years as an adolescent to the moment he turned to the Dark Side, the Chosen One has always had his sidekick with him. R2 was even there for Anakin and Padme’s marriage in Episode II. At the end of Revenge of the Sith, though, Threepio undergoes a complete memory wipe, but R2 gets to retain his knowledge of the Clone Wars and the days before the rise of the Galactic Empire. What Star Wars fans have always wondered then is why didn’t he tell Luke that Vader was his father?
Well, according to a new theory by the folks at ScreenRant, while R2 did accompany Anakin in his last moments and even witnessed the Jedi’s transformation to a Sith Lord, much like Obi-Wan and Yoda, the droid thought that he was dead. In fact, R2 didn’t witness Anakin and Obi-Wan’s duel, but he returned to the ship and left the place with the latter, presumably with the knowledge that his former master isn’t alive anymore. So, essentially, the droid had no idea that Darth Vader is, in fact, Anakin Skywalker.
Of course, it ultimately remains a mystery whether R2 knew about Darth Vader’s secret identity and refused to share this information or genuinely failed to connect the dots. As for Ben Kenobi and Yoda, well, the convenience of the Force would serve as a good answer.
Fingers crossed Lucasfilm decides to finally tackle this continuity error in the world of Star Wars in the future, but until then, that’s as close to an explanation as we’re going to get on this matter.