@op: psychology.
The complexity of the human mind.
Its endless capacity for imagination.
Its ever search for explanations.
Combine those two in an era of mostly ignorance and you get magic as a reason for many phenomena.
Combine that with the fear of death (your own or your loved ones') and you get the afterlife.
Combine that with human hierarchy and you get a ruler of the realm where the afterlife occurs... Call it what you will.
The complexity of the human mind.
Its endless capacity for imagination.
Its ever search for explanations.
Combine those two in an era of mostly ignorance and you get magic as a reason for many phenomena.
Combine that with the fear of death (your own or your loved ones') and you get the afterlife.
Combine that with human hierarchy and you get a ruler of the realm where the afterlife occurs... Call it what you will.