This one was the will of God, according to scripture. Why do you think this was wrong?
You see nothing wrong with god-ordered genocide, eh? You don't hold your nose at slaughtering all the civilian males, and enslaving all the women and children of a tribe? You don't see a problem with one ethnic tribe slaughtering or driving out or enslaving all other ethnic tribes inhabiting the region of the earth God Gave Them? Not exactly a walking advertisement for God's Moral Laws, are you?