Mufasa was originally not supposed to appear after his death.
The spirit scene was added after producers thought Simba needed a reason to go back to Pride Rock. It was also the last scene created for the movie.