Let me start by saying that I can’t explain all of it myself. There are still plenty of parts of the Bible that don’t make sense to me and some that really disturb me. I don’t think I’m completely capable of justifying all the ways of God throughout the Bible (though I’m not sure I should be able to - if I understood everything about God, I’d doubt that s/he really is God).
But anyhow, to your question. It’s easy to point to some of the more violent stories of the Bible and think that they are just senseless acts of smiting, divine overreaction as it were, but I think that may result simply from a surface reading of the text without really delving into the meaning of the stories. Personally, I didn’t really start to understand the biblical stories until I started to understand injustice and how much God hates it. As I became aware of all the injustices in our own world - from sex trafficking, to modern slavery, to exploitation of the poor, to gender related violence, to genocide, etc., etc. - I started to realize that most of the time when God seems so angry or violent in the Bible, it’s because he’s angry at these kind of injustices.
That’s the tension throughout all of scripture is that God is both a God of love but also a God of justice. He fights for the cause of the oppressed, the poor, and the abandoned - so it’s natural that he would seem a fearful and vindictive God to those of us (like most of us in modern Western society) who more closely identify with the wealthy oppressors. But frankly, I don’t think the Bible was written primarily to people like us (wealthy, educated, powerful). Try reading the Bible instead through the eyes of a Latin American peasant, or a Sudanese refugee, or a Southeast Asian sweatshop worker - suddenly the God of the OT seems like a welcome figure of liberation and justice.
I’m very serious about this. Until we read the Bible through the eyes of the marginalized and oppressed, I don’t think we’ll really understand it, since the vast majority of it was written by and for a marginalized and oppressed people. Until we learn to get very angry about the oppressions that still go on in our own world, I don’t think we will be able to understand why God gets so angry too.
Just one example, try not to read the Exodus as a story of God smiting the innocent Egyptians. Instead read it from the point of view of an escaped slave fleeing for your life against the might of the most powerful empire on earth at that time. Put it into our own times. What if the story was about God standing in the way of the Nazis as they were about to perpetrate the Holocaust, or in the way of the Sudanese nationals as they slaughter the people of Darfur? Suddenly God’s violence seems a little more justified - after all we don’t fault the Allies for smiting the Nazis as we liberated Jews and other Europeans from their oppression, do we? It’s a similar kind of thing.
Oh, and another example - you’ve all mentioned Sodom & Gomorrah, but I think you’ve probably been misled by the Jerry Falwell’s out there into thinking that God smote S&G for homosexuality. The Bible says nothing of the sort. In fact, the Bible is very clear what Sodom’s crime really was. Ezekiel 16:49 says “‘Now this was the sin of your sister Sodom: She and her daughters were arrogant, overfed and unconcerned; they did not help the poor and needy.” In other words, Sodom’s sin was injustice - and again, God takes oppression or even apathy towards the poor and oppressed very, very seriously. (BTW, Sodom here does sound an awful lot like another contemporary society we’re all familiar with. I concur with Billy Graham that “if God doesn’t judge America, he’s going to have to apologize to Sodom and Gomorrah”. Arrogant, overfed and unconcerned - yeah, that sounds about right.)
But I think you probably get my point. Again, I’m not saying I can explain away every disturbing thing in the Bible this way - there are still lots of parts that I want to hope weren’t really from God. But using these new lenses, the lenses of the oppressed, a lot of things about the Bible have started to become a lot more clear.
BTW, I think part of the point of Jesus’ message is that he comes to offer mercy not just for the oppressed but for the oppressors as well, because Jesus points out that the oppressed too often turn into the oppressors once the tables are turned. This is the story of Israel in the OT - everytime God liberates them from one oppressor, they turn right around and start oppressing others - so God smacks them down again. In the NT the Jews are again looking for liberation from their oppressors (Rome) but Jesus’ message is that they are really oppressing themselves - through the exploitative Temple system they’ve set up, through their racist and exclusionary religious rules, through their own inclination towards violence and hatred. Basically what Jesus says is “This whole time you’ve been praying for God to smite the oppressors and bless the oppressed, but what happens when the oppressed are their own oppressors? What if the problem is that all people, oppressed and oppressors, have the same inclinations toward violence and evil and injustice? What if the only solution is to break the cycle of revenge and offer forgiveness and peace to both sides?”
Again, this is why Jesus was crucified - the Jews were looking for just another liberation from their external enemies, and Jesus said, no, first you need a liberation from yourselves, from the enemy within. That’s not what they wanted to hear, so they killed him.
One other point I should make too about how to understand the disturbing parts of the Bible: we need to realize that most of the characters in the stories are not perfect. The Bible is actually quite amazing among ancient literature in that it constantly gives us flawed heroes. We are not supposed to read stories about Lot sleeping with his daughters or Jephthah sacrificing his daughter as if they were exemplary stories that we should emulate. These stories are intended as cautionary tales about how badly wrong even the people of God can tend to go. It would be absolutely ridiculous to assume that “Well, it’s in the Bible so God must approve of it.” Not at all. It’s in the Bible so that we can see how sick and twisted we humans can tend to get, even when (or sometimes, especially when) we think we’re obeying God.
And again, this ties back again into Jesus’ constant critique of the religious people of his day. He was constantly saying to them, “You think you’ve got it just because you act religious and follow all the rules - but you keep missing out on what is most important - justice & mercy” (my paraphrase of Matthew 23:23).
Anyhow, I hope that gives you at least some idea of how I begin to make sense of these difficult parts of scripture. This doesn't resolve every issue, and even using these lenses there are still plenty of passages that one could hold up as examples of unnecessarily violent or unjust behavior on the part of God. I don't have all the answers. But this approach has helped me quite a bit nonetheless and widened my view of God as well.
Links to this post