Those nations were in the land to test the Israelites. The Lord wanted to see if Israel would obey the commands he had given to their ancestors by Moses.