Belief in an afterlife is a construct: It must exist therefore it exists.
We can all see that life is unfair. Good things happen to bad people and bad things happen to good people. People strive their whole lives to be "good" and end up with bupkis. So there MUST be some reward or punishment "later" to balance the scale.
So "we" invented the concept of justice in the afterlife. I'm certain that belief predates Christianity. The curious thing is that Judaism has no tangible, accepted thoughts on the afterlife...so jews can just adopt what makes them feel best about the situation. See previous paragraph.
But do we REALLY believe that? Our behavior would seem to indicate we don't really believe that a life of virtue will be rewarded and a life of evil will be punished.
All bullshit, illusion, and delusion aside, there is no proof of an afterlife. So maybe we should live as though this is it. Which is what most people do anyway. We are all animals, just like the livestock that are slain every day by butchers. When we're gone, we're gone. If the memory lives on, that's fine, but it doesn't change the reality.