Though Luke Skywalker appeared in The Force Awakens for just a brief, non-speaking cameo appearance at the end, it would not be incorrect to assert that he is one of the most prominent figures throughout the film.
The opening crawl makes this very clear, with the very first words we read to start the sequel trilogy are these: “Luke Skywalker has vanished.” Setting the stage for the rest of the film, we learn that Poe Dameron is on Jakku to retrieve a map that will hopefully lead to Luke Skywalker from Lor San Tekka, but the First Order wants the map too. Kylo Ren and the First Order are after the map to Skywalker, as are Leia Organa and the Resistance. The search for Skywalker drives much of the plot of the movie, until at the very end the legendary Jedi Master is found by Rey.
The Last Jedi picks up right where The Force Awakens left off, showing us more fully who Luke Skywalker is at this point, what he’s doing on the island, etc. One thing never mentioned in the film, however, is the map that was so critical to the previous film. This has caused some to accuse Rian Johnson of creating a plot hole in his movie for ignoring the map to Skywalker, but it need not be seen as a plot hole. Instead, there’s a perfectly reasonable and understandable backstory, but it begins with this very, very critical piece of information: there was never a map to Luke Skywalker.
Luke’s Jedi Journeys
Following the Battle of Endor, Luke Skywalker resigned his commission from the New Republic and began living as a private citizen, exploring the vast history of the Jedi. The Empire had tried to eradicate everything they could about the Jedi, which made things harder and take longer, as Luke spent many years exploring the galaxy. Throughout his journeys, Luke recovered as much as he possibly could about the Jedi, gaining plenty of knowledge about the Jedi and the Force, recovering lost artifacts and relics, recovering ancient Jedi texts and scriptures, and much more. He journeyed the galaxy with his faithful companion, R2-D2, and gained extensive knowledge about the Force and the Jedi Order.
Luke also found an ally in Lor San Tekka, an old explorer who couldn’t wield the Force but admired and worshipped it. An ally of Luke and Leia, Lor San Tekka had seen the Jedi Order prior to the Clone Wars and didn’t believe the lies that the Empire spread about the Jedi being traitors. He wasn’t Force sensitive himself, but during the reign of the Empire he belonged to the Church of the Force, and many years later he would retire to a village on Jakku made up of worshippers of the Force. But before he retired, the old explorer went on many adventures throughout the galaxy, with a particular interest in the Jedi and the Force, and he discovered many Jedi secrets which the Empire had tried to suppress and hide. Throughout Luke’s journeys, he apparently met Lor San Tekka and the two struck up a friendship (with Leia, too), and they also shared information and collaborated on some discoveries.
One such discovery was particularly significant: the location of the first Jedi Temple.
As Luke explored the galaxy and accumulated knowledge of the Force and the Jedi’s past, he gained plenty of clues as to where the origin point of the Jedi Order had been, but the exact location kept eluding him and remained a mystery for a while. But in studying samplings from a Uneti Tree, it helped Luke to find the location. Uneti Trees bear a Force sensitivity of their own and in their own way, and there was a very prominent one housed in the Jedi Temple on Coruscant, known as the Great Tree. After the rise of the Empire, all that remained of the Great Tree were two twigs, housed in an Imperial storehouse on Vetine. Following the Rebellion’s victory at Endor, Luke Skywalker and Shara Bey recovered the twigs from the storehouse. Bey and her husband, Kes Dameron, planted one of the twigs near their home on Yavin 4. Luke took the other one. (In another fun fact, the staff used by Chirrut Emwe in Rogue One was made from Uneti wood.) Using samplings from the Uneti tree, Luke was able to piece together the location of the first Jedi Temple, with the help of Lor San Tekka. Uneti Trees grow on Ahch-To, and the library housing the ancient Jedi texts on the planet in The Last Jedi is a Uneti Tree.
Luke used the samplings from those trees to locate the first Jedi Temple as being on Ahch-To, an ancient world with a strong Force presence similar to Dagobah and Mortis. Luke didn’t tell anyone about this discovery, however, keeping the information to himself until a later date.
In the meantime, Luke would eventually begin training a new generation of Jedi, establishing his new Jedi Temple on a world known only to the Jedi Master, R2-D2, and the apprentices. Luke took his nephew, Ben Solo, and eleven other disciples whom Luke had encountered during his journey, and was well on his way to re-establishing the Jedi Order. But then Ben Solo rebelled, taking some of Luke’s students with him and killing the rest. Devastated about having failed, Luke picked up everything and left. He headed for Ahch-To at last, taking with him the artifacts, relics, and scriptures he had accumulated throughout the years, and crashed his X-Wing into the waters, intent on living the rest of his life on the planet in self-imposed exile, cut off from the Force.
The Map to Skywalker
With Luke having vanished, those who knew him best – including Han Solo – believed that he went looking for the first Jedi Temple. So logically, if one were to find the map to the first Jedi Temple, one would find the map to Luke Skywalker. The First Order recovered vast maps from the archives of the Empire, but the archives were incomplete. They still missed a crucial piece – the piece that Lor San Tekka gave to Poe Dameron on Jakku and which the Resistance pilot subsequently gave to his droid, BB-8.
How did Lor San Tekka get the map? Well, it is not hard to understand that in light of his backstory with Luke: he helped Luke discover the location of the Temple in the first place! We don’t know exactly whether Lor San Tekka knew the precise location or not, but nonetheless given the fact that he worked with Luke to discover the location it would have been easy for him to recover the information. So it makes sense that, shortly before the events of The Force Awakens, General Leia Organa would comission Poe Dameron and Black Squadron to track down Lor San Tekka in order to aid their quest in finding Luke Skywalker. The First Order also had this idea, however, and that led to a chase for the old explorer as both sides tracked him down. The Resistance eventually recovered him and brought him to Leia, and Lor San Tekka said that, while he didn’t know where Luke was, he thought he had a way to find out and that he’d contact the Resistance when he did. And so, at the start of The Force Awakens, he gives the map to the Resistance, saying “this will begin to make things right,” hoping to help Leia find her brother. Luke hadn’t told people about the location of the Jedi Temple, but Lor San Tekka had helped him find it – and therefore was able to figure it out as well. He was the crucial link between the Resistance (and the First Order) and the location of the Temple.
But once the Resistance had that piece, which was called “the map to Skywalker” throughout the film, they realized that it was incomplete. It was only a piece of the map, not the entire thing. Enter R2-D2.
Luke’s loyal companion had been in self-imposed low-power mode since Luke had left, but during that time R2 was organizing all of the information in his data banks. Having never had his memory erased, a practice that stretched back to his days as Anakin Skywalker’s astromech droid, R2 possessed a wealth of knowledge and information. He had traveled with Luke and been a loyal companion for at least 28 years, and he had overall accumulated nearly seven decades worth of information. Added to that, very often when R2 had plugged into a database over the years, he had downloaded a copy of the information to store in his memory. So when R2 realized that the missing parts of the map to Ahch-To were in the archives of the Empire, he began racking his memory – because, after all, when he had plugged into the Death Star in A New Hope to find the Princess he had downloaded a copy of the database. The Empire had compiled vast amounts of information about the Jedi and the locations of Jedi Temples in an effort to eradicate and hide it, but it also meant that when R2 accessed the system, he downloaded the maps too.
As J.J. Abrams said at the time, “BB-8 comes up and says something to him, which is basically, ‘I’ve got this piece of a map, do you happen to have the rest?’ The idea was, R2 who has been all over the galaxy, is still in his coma, but he hears this. And it triggers something that would ultimately wake him up.”
What triggered inside R2 was this: the Resistance now had a piece of the map that was uncharted and that the Empire didn’t have, but the Empire did have information about the rest of the map that the Resistance didn’t have. So if BB-8 had the missing piece of the map, perhaps R2 had the rest! So he searched his memory, and sure enough, he was able to recover it from the archives of the Empire.
So off Rey, Chewbacca, and R2-D2 went, heading for Ahch-To in order to find the last Jedi. The map did lead to Luke Skywalker, but not because the Jedi Master left it behind so that people could find him; rather, because the Resistance found the way to the first Jedi Temple, where Skywalker lived in exile. Therefore The Last Jedi ignoring the map wasn’t a plot hole, because the map was no longer needed (since Skywalker had been found) and was no longer relevant. They had found the last Jedi; now it was time to explore what drove him to Ahch-To, not what led Rey there.