The scene was set. Chewbacca had just watched his oldest friend, his brother-in-arms die, murdered at the hands of his son, who was likely like a nephew to Chewie, as well. He returns to the Resistance base with Rey and an injured Finn. When he steps off the Millennium Falcon, Leia is standing their waiting, and... they walk right by each other.
"That was probably one of the mistakes I made in that," J.J. Abrams, co-writer and director of Star Wars: The Force Awakens told Slashfilm. "My thinking at the time was that Chewbacca, despite the pain he was feeling, was focused on trying to save Finn and getting him taken care of. So I tried to have Chewbacca go off with him and focus on Rey, and then have Rey find Leia and Leia find Rey."
So, Chewbacca was originally supposed to be clearly focused on getting Finn medical attention, but "because he was right there, passed by Leia, it felt almost like a slight, which was definitely not the intention."
The way Abrams talked about Rey and Leia's hug may have also revealed something. Despite rampant fan speculation that the hug indicated the two knew each other before this moment - or at least that Leia knew Rey, Abrams describes it as if it's the very first time they've been eye to eye.
"The idea [was] that both of them being strong with the Force and never having met, would [still] know about each other — that Leia would have been told about her beyond what we saw onscreen and Rey of course would have learned about Leia. And that reunion would be a meeting and a reunion all in one, and a sort of commiseration of their mutual loss," Abrams said.
"Being strong with the Force and never having met," he said, possibly dashing the hopes of millions of fans. Of course, that could just be in context of the scene, or Leia could still know who Rey is, but have not really met her - or their first meeting could've been wiped from Rey's mind... Okay, Star Wars fans, time to rewrite your theories.