H. P. Lovecraft writes:
THE OLDEST and strongest emotion of mankind is fear, and the oldest and strongest kind of fear is fear of the unknown. These facts few psychologists will dispute, and their admitted truth must establish for all time the genuineness and dignity of the weirdly horrible tale as a literary form. Against it are discharged all the shafts of a materialistic sophistication which clings to frequently felt emotions and external events, and of a naïvely insipid idealism which deprecates the æsthetic motive and calls for a didactic literature to "uplift" the reader toward a suitable degree of smirking optimism. But in spite of all this opposition the weird tale has survived, developed, and attained remarkable heights of perfection; founded as it is on a profound and elementary principle whose appeal, if not always universal, must necessarily be poignant and permanent to minds of the requisite sensitiveness.
This is from Lovecraft’s monograph Supernatural Horror In Literature, which is considered the seminal 20th century treatment on the subject. In it, he surveys many masters of the macabre in the centuries and decades up to his time.
I don’t agree with him that fear is the oldest or strongest emotion or that fear of the unknown in particular is. I think mankind came into this word (whether you buy evolutionary accounts or not) with a robust set of emotions, no one of which predominates the others.
That being said, fear is a powerful, primal emotion, and fear of the unknown is one of its major expressions.
That is a sufficient reason for horror stories being popular despite the efforts of those who would cramp literature down into just those forms of naive realism that would seek to uplift all readers into "smirking optimism." (Gotta love that phrase.)
God gave the human imagination dragons, whether as symbols of actual or fanciful evils, and as Lovecraft points out in his monograph, the weirdly horrible has haunted human literature since its dim beginnings in primitive folklore. It’s part of the human psyche, and nothing is going to change that.
One of my own theories is that we like such literature for the same reason that kittens and puppies wrestle with each other and that boys play mock combat games: It’s a way of preparing ourselves psychologically when we may have to face horrible dangers, a way of experiencing such situations in a safe way (think: holodeck with the safeties on) so that we will be psychologically prepared for them when we face terrible real-life situations with the safeties off. To prep us for these, we have an inbuilt drive that makes us want to "play" dangerous situations so that we have something to fall back on when we encounter them for real.
When we’re young, we physicalize this through play. When we’re older, we internalize it through literature. But it’s the same phenomenon.
We may never encounter in real life the specific dangers we read about in horror stories or thrillers. Cthulhu is, after all, fiction. But there are things in the world just as evil and–to us as individuals–just as deadly as Cthulhu.
Better to have some experience of such evils in a simulator than to face them cold.
Kinda like how one of Starfleets main tests was to face your strongest fear and overcome it. You can’t have people going into combat who may freeze.
Also interesting that from what we saw, and from what we heard from others about their test, that the fear of dying often wasn’t the biggest one…