I theorize that the antecedents of Hell arose among primitive hunter-gathers for very specific reasons.
I believe that authority and social order were neccesary to prepare for the future, with a specific example being storing large supplies of food for the winter.
If everyone was good and selfless, then the community had a better chance of surviving the winter in ease and comfort. If everybody defies authority and only cares about themselves, then winter means starvation, disease, and death.
It seems–at least to me–that there are paralells between planning for a future of ease, health, and harmony when the year “dies” with winter and an afterlife of paradise if one is “good.”
When humans became aware of our own mortality, and this was coupled with the need for co-operative behavior with seflessness and authoritative leadership to survive winter . . . then this morphed into an afterlife predicated with heaven and hell based on one’s behavior in this life.
In many ways, we are still cavemen.
Please note that these are only my ideas, and–not being an anthropologist–I only claim that this is something I believe, and not something I know.