16Then the LORD raised up judges, who saved them out of the hand of those who plundered them. 17Yet they did not listen to their judges, for they whored after other gods and bowed down to them. They soon turned aside from the way in which their fathers had walked, who had obeyed the commandments of the LORD, and they did not do so. 18Whenever the LORD raised up judges for them, the LORD was with the judge, and he saved them from the hand of their enemies all the days of the judge. For the LORD was moved to pity by their groaning because of those who afflicted and oppressed them. 19But whenever the judge died, they turned back and were more corrupt than their fathers, going after other gods, serving them and bowing down to them. They did not drop any of their practices or their stubborn ways. 20So the anger of the LORD was kindled against Israel, and he said, “Because this people has transgressed my covenant that I commanded their fathers and have not obeyed my voice, 21I will no longer drive out before them any of the nations that Joshua left when he died, 22in order to test Israel by them, whether they will take care to walk in the way of the LORD as their fathers did, or not.” 23So the LORD left those nations, not driving them out quickly, and he did not give them into the hand of Joshua. – Judges 2:16-23
The Israelites were a perfect example for us of how God handles disobedience and imperfection in a relationship with Himself. Paul says that these things happened to them as examples for us. Looking at the various passages of the books like Judges, gives me a better appreciation for God’s work in my own life. God told them to get rid of the nations so they wouldn’t have stumbling blocks in their way, but they didn’t do their part and God allowed those folks to stay and “test” them a whole lot. Similarly in our lives, God invites us to drive out the things that would lead us astray and cause temptation. He even provides the Holy Spirit to wage the battle and drive them out for us. Why then do we leave so many “hostile nations” walking around within our borders? I can assure you that any left behind will become “testy” at some point.