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 echoes; as dreams often bring to mind things once forgotten (and similarly, we think we forget the things we dream), so sometimes members of the Dream can take on the form of someone now dead.
They don’t do it on purpose.
Human dreams are sustenance for the People of the Dream, and it doesn’t really matter what kind of dream it is. Certainly those who believe in ghosts have more vivid dreams than many others; perhaps these so-called spirits aren’t so innocent after all.