EDIT: Wait…what if we just cut the lady out? Rey stands up, looks back, sees the ghosties, and flies away in the Falcon?
Kinda betrays the title of the movie. She needs to declare her newfound family.
Anyways, with the puppet show implemented soon, the ending scene will be a nearly exact replica of that Aki Aki lady asking for her last name. So the ending scene will be there to reflect her growth since then (she feels worthy to claim the Skywalker name now).