My thoughts about ghosts are mainly formed by this book The Hollow Man.
Wherein Mind is a holographic pattern, the brain is the holographic projector and you save an imperfect copy of every person you get to know, the better you know them the better the copy.
Ghosts can then be considered remnants of lost copies of people, imaginary or real.
If for example you have a recurring dream for several years that someone is breaking into your house and later forget you ever had those dreams, parts of the copy can return as the sound of someone opening your door and walking into your house.
That sounds reasonable, but doesn't explain why they show up when the people that never had a memory about these things still claim to experience ghosts.
Unless the holographic thing also affects non-living things, which makes it sound a lot less reasonable.
Additionally, I never once experienced a ghosting.
The weirdest inexplicable thing I ever experienced is that at some point I noticed I had two copies of the first CD I ever bought. It was the first I ever bought, which was a big deal, so I wouldn't buy it again. And none of my friends even remotely liked Happy Hardcore so I couldn't have accidentally packed their copy or anything. THIS IS WEIRD. But never ghosts....
One possible explanation for experiencing "ghosts" that are unlike anything you've experienced before is that your mind makes up a scenario, in, say, a dream, or perhaps a composite of things from books or movies, and then generates it as an entire scene. If it replays it enough times, you then have the foundation for projecting utterly new "ghosts".
That wouldn't explain why different people can have the same experience in the same place without knowing about each others' experiences, but it is one possibility. That, or somehow physical objects are capable of storing "recordings" and playback can be triggered by certain things like time of year or time of day.
I mean, it's all pure speculation anyway.