The Bibles answer to this is found in the book of Genesis. God showed Abraham the future of his descendants in a vision, explaining that they would return to the promised land of Canaan only after four hundred years in Egypt, as the Amorites would not be ripe for punishment until then (Gen. 15:13-16).
In other words, God would not carry out the death penalty on the wicked inhabitants of Canaan until it was fully appropriate, even though this would involve great suffering by the descendants of Abraham being detained in Egypt under a vicious regime (Exod. 2:23).
What does the phrase ripe for punishment mean? This is discussed in the following chapters in Genesis. God can do anything he wants, even making the barren Sarah fertile in old age (Gen. 18:14). Or can he? Surely the judge of all the world can only do what is just, Abraham points out a few verses later in his debate with God over Sodom (Gen. 18:25). He cannot act unjustly!
Abraham is shown to be right. Even though the inhabitants of Sodom are seen to be unspeakably wicked, Gods angel cannot act in judgment until the morally compromised Lot and his family are out of the area (19:22). Only then are the cities destroyed.
It turns out later that the destruction of the wicked people of Canaan is to be carried out by Gods chosen people, the descendants of Abraham. Will this help them grasp the seriousness of sin? It appears not, because by the time we reach Judges 19, the Israelites are no better than the inhabitants they have replaced. Their godless behaviour will eventually lead to the exile.
You may ask, why does a loving God kill people at all for bad behaviour? Genesis replies that the death penalty is automatic for people who disobey God (2:17). We are all under it. In short, the whole book is about the struggle between good and evil and how people can be rescued from it. How contemporary is that?
In due time, God himself would accept the death penalty on the cross on our behalf, to deal with sin and wickedness in human beings once and for all, which is first hinted at in Genesis 3:15. Great news!
So a careful reading of Genesis shows that the Herem is not inconsistent with the God who has no desire for the death of a sinner, but rather that he should turn from his wickedness and live (Ezek. 33:11).
David Pennant, Woking, UK