In this way I will test whether Israel will keep the way of the LORD by walking in it as their fathers did.”
By leaving those nations, the LORD will test whether Israel keeps His way as their fathers did.
It explains the purpose of the nations' continued presence.
16Then the LORD raised up judges, who saved them from the hands of those who plundered them. 17Israel, however, did not listen to their judges. Instead, they prostituted themselves with other gods and bowed down to them. They quickly turned from the way of their fathers, who had walked in obedience to the LORD’s commandments; they did not do as their fathers had done. 18Whenever the LORD raised up a judge for the Israelites, He was with that judge and saved them from the hands of their enemies while the judge was still alive; for the LORD was moved to pity by their groaning under those who oppressed them and afflicted them. 19But when the judge died, the Israelites became even more corrupt than their fathers, going after other gods to serve them and bow down to them. They would not give up their evil practices and stubborn ways. 20So the anger of the LORD burned against Israel, and He said, “Because this nation has transgressed the covenant I laid down for their fathers and has not heeded My voice, 21I will no longer drive out before them any of the nations Joshua left when he died. 22In this way I will test whether Israel will keep the way of the LORD by walking in it as their fathers did.” 23That is why the LORD had left those nations in place and had not driven them out immediately by delivering them into the hand of Joshua.