“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?’” Abrams said. “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.”
The director acknowledges that R2’s sudden “awakening” at the end was designed to be an emotional storytelling utility: “While it may seem, you know, completely lucky and an easy way out, at that point in the movie, when you’ve lost a person, desperately, and somebody you hopefully care about is unconscious, you want someone to return.”
So for those let wondering: BB-8’s earlier question rattles around inside R2’s dome for a while. Those old astromechs must just take a while to boot up again.
Then as the movie draws to a close, our old friend finally comes back – and leads us to another one.