Ghosts are one of the few remaining members of the Dream to be part of our world. They are not, sadly, actually dead people; when people are dead, their souls go elsewhere. Ghosts are what happens when badly wounded people of the Dream desperately cling to mortal memories to keep from fading to nothing. As dreams often bring to mind things once forgotten, members of the Dream will sometimes take on the form of someone now dead.
They don’t do it on purpose. It’s desperation, clinging to any port in a storm. The strange part is they take on the memories of the person dreaming dead people, so the presenting ghost will not be accurate to the person who died, but the memory of the dreamer.