The Falcon appears to contain
another copy of the Jedi sacred texts
How did they come to be located on the ship?
Did Obi-Wan leave it there when he was aboard? Did Han and/or Chewie pick it up at some point? Did they know what they had?
Science Fiction & Fantasy Stack Exchange is a question and answer site for science fiction and fantasy enthusiasts. It only takes a minute to sign up.Sign up to join this community
Entirely speculative as we don't see her do it, but
The viewer is made to believe that Luke was in fact about to burn the sacred texts and that Yoda did it for him because Yoda believed it's time for Luke to move on from those ways and to realise his students will grow beyond him. Yoda almost certainly knew that Rey had taken the books given that he stopped Luke and struck the temple alight himself. Furthermore, when Luke is tempted to go in and save them Yoda causes the fire to explode outwards. It is after this point that Luke realises what he must do.
Yoda certainly knows that Rey has them since he says:
There's nothing in that library that Rey doesn't already possess
Source: just watched it again.
I think it's logical enough to assume the above given this is one of the first occurrences of books in the universe so it is unlikely there were multiple copies she'd acquired and the view at the end was a way of telling the viewer "Rey can still learn".
I believe that Rey took them from the temple after
Luke blew up the hut upon seeing Rey with Kylo Ren
There's a gap between that scene and
Rey departing on the Millenium Falcon
She knew where they were, she was determined to learn more about being a Jedi, and that Luke didn't want their contents known. And you can't tell me she didn't want to spite him, just a little.
We finally have explicit confirmation that Rey stole them in The Rise of Skywalker: The Visual Dictionary:
It was Luke Skywalker's conviction that the library on Ahch-To should be destroyed, as the Jedi Order had been locked in a ruinous cycle of galactic upheaval since its very inception. Rey - perhaps driven by her innate scavenger instincts - left with the books before they could be burned, hiding them aboard the Millennium Falcon without he Master's knowledge.
Of course it was also heavily implied that she stole them throughout the film including, but not limited to, Yoda's message to Luke on Ahch-To:
Yoda: Page-turners they were not. Yes, yes, yes. Wisdom they held, but that library contained nothing that the girl Rey does not already possess.
The Last Jedi