It turns out Rey and Finn didn’t start out as best friends. J.J. Abrams’s director’s commentary for the upcoming Star Wars: The Force Awakens 3D Blu-ray release shows they were originally going to be kind of crappy to each other. Also, Rey originally had no clue who Luke Skywalker was.
According to the commentary, Abrams reshot almost all of Finn and Rey’s first encounter, as well as their banter on the Millennium Falcon, to make the two characters friendlier toward each other.
In the earlier version, Rey was going to act cold and distant to Finn. However, Abrams said they soon realized that the two actors had a strong chemistry that was better served by more playful banter. Plus, it made more sense to give Rey’s character hope early on, despite all the horrible things she had been through. That way, when Finn lied to her about being a fighter in the rebellion, she immediately trusted him and wanted to help.
It also turns out that Rey originally didn’t know who Luke Skywalker was, but as Abrams pointed out, that didn’t make sense because she later recognized Han Solo. Can you imagine a Rey who didn’t believe in the myth that was Luke Skywalker? It would’ve totally changed the tone of the final scene, when she comes face-to-face with the legend himself.