Why did God destroy the Gentiles in the promised land?

First, just as doctors have to clean up carrion when dealing with wounds, they can only bandage wounds after disinfection.

Second, everyone dies because of his own sin, and no one will die for no reason. People in the land of Canaan are full of evil.

Third, God commanded Israel to do it, which was a test for them, knowing that they could not do it, and letting them know that they were weak, and that Israel had committed a crime in this matter.

Fourthly, all the above points to the eternal redemption of Jesus Christ, that is, only by returning to Christ can people be completely freed from sin. In the Old Testament, the prostitutes Ruth and Rahab were Canaanites. In the New Testament, more people are saved, and they are all chosen by God.