It immediately stops the devastating impact of Rey’s loss and separation from Ben. Emotional reversals. Sometimes things are bittersweet.
I mean, he’s still dead. Considering the film doesn’t take any time to reflect on said loss, I’d say having him as a ghost is the only way to reconcile with the relatively chipper attitude towards his death.