In the Bible and other works we find the standard wisdom of each time and place.
This is why the image of God seems to change and evolve.
Early in the Bible we find the philosophy of success - i.e. God rewards good behavior and punishes bad behavior on earth.
This can be seen in the Old Testament prophets like Jeremiah and Ezekiel.
The misfortunes of Israel are ascribed to punishments from God for turning away from Him.
By he time that the Book of Job was written humankind had realized that this simply did not happen.
The Book of Job is an attempt to explain why.
When we come to the time of the New Testament we are presented with an entirely new image of God as a loving Father who wishes the best for His children.
This is interspersed with the old images of punishment which humankind had not entirely shaken off. Some of these were projected into the afterlife.
The time has now come to discard the false image of God as a dispenser of rewards and punishments.
God punishes no one.
He is our loving Father and we are His children.