Warning: The following contains spoilers for Star Wars: The Last Jedi
Luke's part in The Force Awakens was successfully kept under wraps until the movie came out, with fans learning the truth in the opening crawl "Luke Skywalker has vanished." Why was he gone? Where did he go? This mystery slowly unfurls, with Han Solo giving most of the details, explaining that his student, Kylo Ren, turned on him and destroyed the Jedi Academy and Luke went looking for the first Jedi Temple because of it.
The movie ends with Rey finally getting to Ahch-To, climbing the steps toward the temple to locate Luke standing there in his Jedi robes. She holds the lightsaber out to him, the camera pans out, and it cuts to the credits. By the time we return to this place in The Last Jedi, it doesn't play out exactly like we expected. Luke tosses the lightsaber away, walks off, and locks himself in his hut. The next time we see him, he's no longer in his Jedi robes, he has no interest in training Rey to be a Jedi, being a Jedi himself, or even talking about the Jedi. He says he came to Ahch-To to die and wants the Jedi to end.
This isn't exactly what fans had in mind after seeing the Jedi Master at the end of The Force Awakens. Even the Ahch-To temple may not be what fans thought they were promised. The Jedi Temple on Coruscant in the prequels and other temples that appear in books, comics, The Clone Wars, and Star Wars Rebels are all places strong in the Force where Jedi would go to gain knowledge and insight, or, in the case of old abandoned Jedi temples, secrets about the past.
This is not the temple we get in The Last Jedi. The temple on Ahch-To is little more than a cave, including a small reflecting pool with an image of the Prime Jedi and a cliff with a meditation rock. Outside of the temple itself, there's the Jedi village maintained by the Caretakers and the Tree Library. The Tree is the only place that holds anything that could amount to any sort of ancient revelations about the Jedi, and, ironically, Luke hasn't even read them.
Fans who saw Luke standing in Jedi robes at the end of The Force Awakens and have expected to find a wisened and powerful, but maybe broken version or Luke may have been disappointed to find a Luke who had given up and spends most of the movie closed off from the Force entirely. While he does come around to training Rey, this is not a version of the story where Luke trains Rey in ancient Jedi secrets at the Ahch-To temple before they head off together to face off against Kylo Ren and Supreme Leader Snoke.
In the story we ended up getting, the fact that there's a Jedi temple on Ahch-To isn't relevant to Luke's reason for being there. The Tree Library and the books in it obviously play a big part of the plot, but that's not why he came to the island in the first place He went to Ahch-To because it was hard to find and he wanted to die - taking the Jedi Order down with him. Having come to believe that the cyclical failure of the Jedi was a big reason the galaxy kept getting plunged back into darkness, Luke couldn't handle his own role in perpetuating that cycle, so he fled the galaxy, hoping to meet his end without participating further in its fate.
Similar to Luke's surprise at finding Yoda's humble existence on Dagobah when he thought he'd find a great warrior, Rey is disappointed to find that the legendary Luke Skywalker is refusing the call of heroism. For a movie so adept at subverting expectations, the Jedi Temple on Ahch-To and Luke are both prime examples. And it's fairly likely this is not the direction J.J. Abrams intended the sequel to go when he ended The Force Awakens with Luke wearing Jedi robes - something he doesn't do in The Last Jedi until after he's reunited with the Force, yet it's a story that pays off in a big way, and Rey even stole the ancient Jedi texts before fleeing, so we might yet get to see some ancient Jedi teaching when Abrams returns to close the trilogy out.