Yoda exiled himself at the end of Star Wars: Episode III - Revenge of the Sith, but the reason behind his decision may have been confusing. Long before George Lucas' prequel trilogy began, Star Wars fans knew how the story would end: Anakin Skywalker would become Darth Vader, Palpatine would become the Emperor, and the Jedi would be killed off. But there were some mysteries that fans were still unaware of, such as how Yoda ended up being on Dagobah.

Lucas attempted to tie-up every loose end as neatly as possible with Revenge of the Sith, even going so far as to show Wilhuff Tarkin and the construction of the Death Star. Beyond that, however, the Jedi Purge accounted for the bulk of the movie's attention. Palpatine's Order 66 saw thousands of Jedi perish across the galaxy simultaneously. Only a few Jedi survived the betrayal - namely Obi-Wan Kenobi and Yoda, both of whom took it upon themselves to fight back. Obi-Wan went to Mustafar to confront Anakin Skywalker, and Yoda fought the Emperor in the Senate building on Coruscant. Unfortunately, he failed in his mission.

Related: Everything About Yoda That's Still A Mystery In Star Wars

Yoda's duel with Emperor Palpatine was taxing, and it ended with him barely escaping with his life, thanks in large part to Bail Organa. When Yoda was secretly picked up by Organa, he said, "Into exile, I must go. Failed, I have." Being the Jedi of the Jedi, Yoda's decision to go into exile wasn't self-serving as much as it was prudent and compulsory for someone of his stature. He failed in his duty to protect the Republic and defeat the Sith Lord - the second of which they had come into contact with - and so, exiling himself as punishment, until the time was right for the Jedi to return, really was necessary.

Yoda Arriving On Dagobah In Revenge Of The Sith Deleted Scene

What's interesting is that there's a difference between Yoda living out his years on Dagobah and Luke Skywalker going to Ahch-To. While Yoda's exile stemmed from failure as a Jedi Master (someone who led the Jedi Council), Luke's exile came from a place of failure as a Master to Ben Solo. Luke gave in to the dark side, albeit fleetingly, which was enough to turn his apprentice against him. So he fled and developed an egalitarian point of view regarding practitioners of the Force; in his eyes, the galaxy needed to be rid of both the Jedi and Sith in order to truly survive (and thrive). Luke even acknowledged the Jedi Council's hubris, which made them unable to identify Palpatine as Darth Sidious.

Yoda may have agreed with Luke's point of view to some extent, seeing as he seemingly destroyed the ancient Jedi Texts in Star Wars: The Last Jedi with a lightning strike - though those texts had already been taken by Rey. But unlike Yoda living out his days on Dagobah, training the last Jedi at the time, Luke chose to return to the fold one last time and projected himself on Crait. Despite the Jedi being guardians of peace and justice, they still believed in a religion - the Jedi Order - and Yoda failed in his cardinal task. So the only punishment was exile.

Next: All Star Wars Movies Ranked