Walking though the old testament, and arguments from renowned atheists regarding the untold cruelty of the OT God as demonstrated in many OT accounts came to mind. If you have read the God Delusion, you would have been treated to an opening of a chapter that has a half-page running sentence with nothing but adjectives after adjectives describing this cruel God. I am sure we as christians also find ourselves asking the same questions when we come across these “odd” accounts.
I do not intend to give a detailed resolution here, but merely to further an analogy regarding the OT. To borrow a description from eminent bible scholar B.B. Warfield, the OT is like a room “fully furnished but dimly lit”. People like the new atheists are mistaken and naive about the seeming cruelty of God because they lack the light of revelation. And revelation presents itself in context. They fumble about in the dark, bump into an object, and with a curse complain that the object is in the way.
The point: Read your scripture in context of the whole revelation, and in context of the covenantal relationship we share with our loving and just God.