The command to destroy whole nations of people is difficult for us to process, and while Bible scholars have tried to explain it away, it confronts us every time we read passages like Deuteronomy 7 (similar texts occur in Exodus 23 and Numbers 33). Four things are important to remember:
First, the whole idea was to displace the people of Canaan with Israel. Israel was not duty bound to kill the Canaanites. The Canaanites could always just leave.
Second, the Canaanites were to be driven out for two reasons: God had given the land to Israel. All land belongs to the Lord. It is His to do with as He sees fit, and He saw fit to give it to Israel. Also, the Canaanites were to be driven out because they were wicked.
Third, the Canaanites were to be driven out so they would not infect God’s people with their behavior. Wickedness is more infectious than Holiness. No chance was to be taken that the world would influence God’s people with a different set of ethical behavior.
Fourth, though Israel had been given the Law of the Lord at Sinai, the moral requirements of the Law were binding on everyone. This is how God could justly punish the Canaanites by destroying them. Never forget that while the world is not obligated to be God’s people, they are obligated to live according to His commandments.
Finally, God’s blessings to Israel were always a matter of God’s grace – his undeserved favor. The same is true for God’s people today. Everyone is obligated to behave according to the will of God. But the blessings of God belong to the People of God, and judgment awaits all who disobey.