There's something inherently wrong with the human personality," he says. "There's an evil side to it. One of the things that horror stories can do is to show us the archetypes of the unconscious: we can see the dark side without having to confront it directly. Also, ghost stories appeal to our craving for immortality. If you can be afraid of a ghost, then you have to believe that a ghost may exist. And if a ghost exists, then oblivion might not be the end.
Stanley Kubrick, Newsweek 1980.