God is often portrayed as a rather coarse individual in the Old Testament. Some incredibly grizzly things are said to be done by God. He is said to encourage the Israelite warriors to basically rape the women taken captive in the many wars they had with surrounding nations after killing all the males. What's up with that?
Severus Snape was a rather evil individual throughout most of the story in Harry Potter. He was, like God's portrayal in the OT, a rather evil person. It was only at the end the we learn Severus was really a good guy all along. The author portrayed him as evil for her own reasons. The exact same literary tool is used in the scriptures. In the end, it turns out God is not a bad guy at all, but instead He is the epitome of love and light.
Why as God portrayed as evil in the Old Testament when He was never evil at all? There are many reasons for that, but in this post I'm just pointing out that the portrayal of God in the OT is not at all descriptive of His true nature, which, as I said above, is love and pure light. The NT makes it plain that there is NO darkness whatsoever in God.
The true nature of God was revealed by Jesus Christ. Jesus was a perfect representation of God. He always did exactly what God told him to do. Jesus was an exact image of God. Therefore, if you can't see Jesus doing any harm to anyone, then neither does God.
The only thing that remains is to understand why God utilized the literary tool of making the good guy appear bad until the end.
Yo, rrobs! I hope you're vaxed and well and all things are good at your house.
As you know, I think God exists / gods exist as a concept / thing imagined in individual brains. So each society constructs their favorites deity or deities to reflect their own culture. Thus the God of the first part of the Tanakh is a tough guy, an alpha male, and at that stage [he]'s not the only god, just the tribal god of the Hebrews, in competition with all the other tribes of Canaan and their own gods. [He] says things like ─
Deuteronomy 7:1-2 “When the Lord your God brings you into the land you are entering to possess and drives out before you many nations...then you must destroy them totally. Make no treaty with them and show them no mercy." (and again at 20:16)
and also
Judges 11:23 So the Lord, the God of Israel, dispossessed the Amorites from before his people Israel; and are you to take possession of them? 24 Will you not possess what Chemosh your god gives you to possess? And all that the Lord our God has dispossessed before us, we will possess.
[He] plays with human sacrifice with Abraham and Isaac, does a deal for human sacrifice with Jephthah which is carried out (Judges 11), calls off a famine in exchange for human sacrifice (2 Samuel 21), famously spares Jonah, and in a process I've never understood sacrifices Jesus to [him]self.
But what I think we're looking at is the evolution of Hebrew culture. It's arguable that the great benefit of the Babylonian captivity was to expose many Jewish leaders to a level of sophistication in Babylon that didn't exist in Canaan / Israel, and it was this larger cultural outlook that they brought home with them. At this stage God becomes post-alpha, as it were, and is asserted to be the only God,
By the time we get to the time of Jesus (given an historical Jesus) Jewish culture has been under Greek influence for 300 years, in the wake of Alexander. It's recovered its independence and lost it again to the Romans. While its traditional element is still strongest in Jerusalem, and the Greek influence strongest, arguably, among the Jews of Alexandria, the administrative language of Judea is Greek and the whole NT is written in Greek. Ideas expressed by Jesus in the NT have Greek origins, such as the Cynic notion of taking to the roads, talking to those you meet, and relying on heaven for food and a place to sleep. The Eucharist is taken from Greek practice (bread for Ceres, wine for Dionysos, together). The gnosticism of Paul and the author of John is Greek, with the idea that Jesus pre-existed in heaven with God, created the material universe, and since God is so pure, remote, and removed from the material world, must act as mediator between God and man (an idea not found in the synoptics).
And so on.
In other words, gods reflect their cultures as they exist from time to time. A god who doesn't change with [his] culture loses his congregation and ceases to be a god. The history of God from the southern deserts of Canaan to the warrior tribe of Joshua to the alleged glory of Solomon to the Babylonian captivity to the more civil and sophisticated politics of the later books of the Tanakh to the Greek of the NT is the history of the culture of [his] followers.