Because we currently have the scene before Endor, the only purpose it serves is reminding us that Palps wants Rey dead and that Kylo knows where she’s going. Arguably, having no such indication that he knows where she’s going would make his sudden appearance on the Death Star better. I like how the novelization describes how Rey is convinced at first that he’s a part of the vision she was just experiencing because it makes no sense for him to be there.
I thought Ascendant moved the scene to before Kijimi, to replace the scene where Chewie is revealed to be alive? It doesn’t really serve much of a purpose there either, but still.