Now the angel of the Lord went up from Gilgal to Bochim, and said, "I brought you up from Egypt, and brought you into the land that I had promised to your ancestors. I said, "I will never break my covenant with you.
For your part, do not make a covenant with the inhabitants of this land; tear down their altars.' But you have not obeyed my command. See what you have done!
So now I say, I will not drive them out before you; but they shall become adversaries to you, and their gods shall be a snare to you."
References for Judges 2:3
When the angel of the Lord spoke these words to all the Israelites, the people lifted up their voices and wept.
So they named that place Bochim, and there they sacrificed to the Lord.
References for Judges 2:5
When Joshua dismissed the people, the Israelites all went to their own inheritances to take possession of the land.
The people worshiped the Lord all the days of Joshua, and all the days of the elders who outlived Joshua, who had seen all the great work that the Lord had done for Israel.
Joshua son of Nun, the servant of the Lord, died at the age of one hundred ten years.
So they buried him within the bounds of his inheritance in Timnath-heres, in the hill country of Ephraim, north of Mount Gaash.
Moreover, that whole generation was gathered to their ancestors, and another generation grew up after them, who did not know the Lord or the work that he had done for Israel.
Then the Israelites did what was evil in the sight of the Lord and worshiped the Baals;
and they abandoned the Lord, the God of their ancestors, who had brought them out of the land of Egypt; they followed other gods, from among the gods of the peoples who were all around them, and bowed down to them; and they provoked the Lord to anger.
They abandoned the Lord, and worshiped Baal and the Astartes.
So the anger of the Lord was kindled against Israel, and he gave them over to plunderers who plundered them, and he sold them into the power of their enemies all around, so that they could no longer withstand their enemies.
Whenever they marched out, the hand of the Lord was against them to bring misfortune, as the Lord had warned them and sworn to them; and they were in great distress.
Then the Lord raised up judges, who delivered them out of the power of those who plundered them.
Yet they did not listen even to their judges; for they lusted after other gods and bowed down to them. They soon turned aside from the way in which their ancestors had walked, who had obeyed the commandments of the Lord; they did not follow their example.
Whenever the Lord raised up judges for them, the Lord was with the judge, and he delivered them from the hand of their enemies all the days of the judge; for the Lord would be moved to pity by their groaning because of those who persecuted and oppressed them.
But whenever the judge died, they would relapse and behave worse than their ancestors, following other gods, worshiping them and bowing down to them. They would not drop any of their practices or their stubborn ways.
So the anger of the Lord was kindled against Israel; and he said, "Because this people have transgressed my covenant that I commanded their ancestors, and have not obeyed my voice,
I will no longer drive out before them any of the nations that Joshua left when he died."
In order to test Israel, whether or not they would take care to walk in the way of the Lord as their ancestors did,
the Lord had left those nations, not driving them out at once, and had not handed them over to Joshua.