God told the Israelites to “drive out” (Numbers 33:52) the Canaanites when they entered into the Promised Land and “conquer them and utterly destroy them…destroy their altars, and break down their sacred pillars, and cut down their wooden images, and burn their carved images with fire” (Deuteronomy 7:2, 5). The question has often been raised as to why a loving God would command something like this. Well, archaeology has helped to at least partially answer that question, as I will show momentarily. First though, I think it’s important to point out that the Bible does not leave us in the dark regarding this matter.
Part of the answer can be found in Leviticus 18 and Deuteronomy 18:9–14. In these passages the Bible describes the Canaanites at the time of Joshua as being an exceedingly wicked people who were indulging in incest, adultery, polygamy, bestiality, homosexuality, witchcraft, child sacrifice to Molech, and a variety of other “abominable customs” (Leviticus 18:30). The people had become a dangerous threat to others and if permitted to live would have turned the Israelites away from following God (Deuteronomy 7:4). So God determined that no man would be able to stand before the Israelites until the Canaanites were destroyed (Deuteronomy 7:24).
The Bible says that God is slow to anger (Genesis 15:16, Numbers 14:18). He does not delight in the death of the wicked; He would rather people turn from their wicked ways and live (Ezekiel 18:23). Should the Canaanites have turned their backs on their evil ways as the Ninevites did (Jonah 3:10), I believe God would have shown the Canaanites mercy. But they did not repent. And so God’s judgment fell on them. God used the Israelites to drive them out of the land–just as He would use the Assyrians and Babylonians centuries later to drive the Israelites out of the land for the same sins! God does not show partiality (Ephesians 6:9).
As we consider God’s judgment on the Canaanites and later judgment on the Israelites, I think it’s important to remember that God is sovereign over life; He created humanity and He has the right to do whatever He deems best with His creation. All of life belongs to Him. If He deems a people wicked enough to deserve judgment, then He has that prerogative. And we can trust Him, for He is infinitely wiser than us and all of His works are holy and just (Deuteronomy 32:4).
Now in spite of the Bible’s numerous references to the gruesome practice of sacrificing children by fire to the god Molech , William F. Albright, the renowned archaeologist at Johns Hopkins University, who published more than 800 books and articles, said: “The rationalistic critics of the nineteenth and early twentieth centuries refused to believe that the reports had any basis, especially since archaeological work seemed not to furnish any support." 
That has changed. Dr. Merrill Unger, author of Archeology and the Old Testament, writes “Excavations in Palestine have uncovered piles of ashes and remains of infant skeletons in cemeteries around heathen altars, pointing to the widespread practice of this cruel abomination."  Edwin Yamauchi, Professor of History Emeritus at Miami University in Oxford, Ohio, and a renowned expert in ancient history tells us, “Discoveries in cemeteries in Carthage, the colony of Phoenicia, have now bared grim evidence of the custom of burning babies on pyres."