The theological confession was then expressed that they should have killed all of the Canaanites when they first entered the land in order to be protected from the temptations of Ba al worship. It was a short step to conclude that since God had wanted them to be free from Ba al worship, then God must have wanted them to kill the Canaanites. While there were isolated incidents of that happening there was never a wholesale attempt to exterminate the Canaanites. In other words, it was not simply a direct command from God, but their understanding from a certain time and place in history of what they thought would please God. They changed that later, just as they changed a lot of ideas about God throughout their history.
Christian history has similar circumstances.
For example, religious leaders whipped up the fervor for the crusades with the cry that it was God's will that they should recapture the Holy Land from the infidels. Charlemagne slaughtered hundreds of his captured enemies after forcing them to accept Christianity at the point of a sword. If they refused, they were killed for being pagan. All done with the assurance that he was carrying out God's will in world. A similar argument was made in the United States relating to Native Americans.