How could God order such a thing? And if He did, does that all of a sudden make an evil thing Good, just because He ordered it? This is sometimes called the Euthyphro problem, referring to Plato's Socrates asking just that question.
It's a question that's been asked for thousands of years, most recently over at Philosoraptor. (Yes, The Dude is The Raptor's illegitimate and wayward blogson.)
It's a question that cannot be answered with brute reason---if this life is all there is, then all death is bad, case closed. And since today, Christianity and Judaism don't see their mission as to go around killing the wicked, this question is then simply a theoretical and theological one, and must be seen that way.
That's the short answer.
To understand the Bible as it understands itself (a good way for us to read anything), and since few of us read the Torah deeply or understand its background (me, too---I had to hit the books on this one), it's important to note that
a) Israel didn't go through with the genocide
b) The men of the Bible questioned God's commands just the same as we do and Socrates did
c) The Canaanites were so world-class wicked that they polluted the people around them
d) The righteous were spared
e) The rest had the chance to flee---Israel was not required to hunt them down and kill them; it was nations, not individuals, that were destroyed
f) Israel got exactly the same treatment when it became wicked after Solomon's death and was cast into the Babylonian Captivity
Then Jeremiah said to Zedekiah, "This is what the LORD God Almighty, the God of Israel, says: `If you surrender to the officers of the king of Babylon, your life will be spared and this city will not be burned down; you and your family will live. But if you will not surrender to the officers of the king of Babylon, this city will be handed over to the Babylonians and they will burn it down; you yourself will not escape from their hands.'" (Jer 38.17ff)
This essay by a fellow named Glenn Miller has a pretty comprehensive scriptural reading of the issue. Those with skepticism toward God, the Scriptures, etc., etc. should hear the arguments for the defense. It's the American Way.
I had to get some backup on this Will of God stuff, so I asked Brother Levi, a friend who's a sort of Rastafarian. For those not scriptually inclined, he recommended that sneaky moralist Mark Twain's The Mysterious Stranger. Fortunately, it's here on the internet for free.