You say probably, but how do you know it was not literal beings, be they angels, spirits, aliens ect? And these gods tell them about the afterlife?
If you look back to the Gods of Sumeria, they seem to imply that the Gods walked among them. They were taller than man, giants. Man was created as servants to them.
If this is true, where are these gods now? Some see them as aliens that were here on earth about 4000BC but left. That would explain their absence I suppose.
However it's kind of easy to see these cause of many of these forces of nature that were once called gods as physical phenomenon.
I also believe that the subconscious mind can take these stories of god and bring to life the experience of being in the presence of these gods.
Dreams, visions, waking experiences. Just like in dreams there are autonomous people that you experience and seem to have an existence separate from your consciousness. The subconscious mind can as easily create the experience of a God, completely autonomous from yourself for you to interact with.
IMO these people claim to speak with God really did experience speaking with God, it just happen to be a God created for them by their subconscious mind creating a reality from the stories.
This happens, I know this happens. What I don't know is supernatural beings. If there was evidence for them. A good reason to believe they were not construct of the subconscious mind, I'd be happy to accept such explanations.
However from what I've experienced for myself, I believe it is possible to explain man's belief in gods without resorting to the supernatural.