... At this point, the believer might object that if God kills, he must have a good reason for doing so. Copan says as much, claiming God may take human life for “morally sufficient reasons.” But this changes the argument. Copan conflates this idea with the previous one, but now it no longer is the case that God has the right to kill us because he is our creator; rather, his right derives from there being a moral justification for killing. What we have here, then, is yet another possible reason for the apparently immoral events found in the Bible. According to this view, the troubling episodes in the Old Testament are not what they at first appear to be, for they all have underlying reasons, even if we cannot always see what they are. We may simply not know, or not have thought about, all of the details. In many cases, we may simply be failing to keep the big picture in mind. What we have to do is take all of the facts into consideration.
Thus, one possible reply with regards to the annihilation of conquered tribes is simply to claim that it was fully justified by the terrible behavior of the people in question. Their “degenerate idolatry and moral depravity,” according to some apologists, had to be entirely wiped out from the land. Geisler and Howe, in their work on Bible difficulties, remind readers that the Midianites, for one, had “corrupted God’s people by leading them into idolatry at Baal-Peor so that 24,000 Israelites died in the plague.” Similarly, they say, it was “necessary to completely exterminate any trace of the city [of Jericho] and its people. If anything had remained, except that which was taken into the treasure house of the Lord, there would have always been the threat of heathen influence to pull the people away from the pure worship of the Lord.” Of course the plague that supposedly occurred as a result of idolatry was presumably sent by Yahweh, who after all is, by his own admission, an angry and jealous God. Moreover, it’s somewhat debatable whether worshipping other gods merits being massacred and having even your small children put to death. (It is also interesting that in the almost complete destruction of Jericho an exception was made of the silver and gold, so that it could be taken into “the treasure house of the Lord”; religion, it seems, never changes.)
Now, it is true that there were many behaviors among these conquered peoples which were genuinely bad. They apparently engaged in child sacrifice, for example. But it should be pointed out, first, that to put a stop to child sacrifice by killing everyone involved including the children does not seem entirely sensible; and second, that early on in their history, the Israelites seem to have performed such sacrifices as well. It was sadly an all-too-common practice, and, as will be shown in the next chapter, there is biblical evidence that God’s chosen people were no different from other tribes in this respect. But if that is true, then the fact that other tribes engaged in this practice could not be the reason why God commanded their annihilation. ...
 Paul Copan, “Are Old Testament Laws Evil?”, in William Lane Craig and Chad Meister, eds., God Is Great, God Is Good, InterVarsity Press, 2009, p. 148
 Gleason L. Archer Jr., Encyclopedia of Bible Difficulties, Zondervan, 1982, p. 158
 Norman L. Geisler and Thomas Howe, The Big Book of Bible Difficulties, Baker Books, 1992, p. 110
 Geisler and Howe, p. 138