I have mentioned it on here before, but it is quite interesting how the brain works, and often it isn’t how we imagine. For example, our senses take in the surroundings and recreate those surroundings in our brain. Our brain then puts us inside those surroundings it has created, so basically it’s like we live in a video game in our brain. That is why it takes a child so long to learn to walk – positioning ourselves in our brain is a very hard task to learn, whereas a child’s growing brain could master the art of walking in no time. It also explains how we have out-of-body experiences as the brain can lose its ability to put us in the right place, through severe shock for example. We add our emotions to the mix, which are from our life’s experiences and which often contains baggage we would rather not add.
The brain then makes assumptions to fill in bits that aren't clear, and they aren't always correct. Someone's brain might well create a ghost to fill in for something it can't resolve.