The Angel of the LORD Rebukes Israel at Bochimby emmanuel_higgins

Judges 2:3

Wherefore I also said, I will not drive them out from before you; but they shall be as thorns in your sides, and their gods shall be a snare unto you.

The verse records God's sentence after Israel disobeyed His command to make no league with the inhabitants of the land, to throw down their altars, and to dispossess them.
Because they did not obey His voice, He would not drive those peoples out from before them, but they would remain among them as a painful affliction as thorns in their sides, and their gods would become a trap and snare leading them astray.

The warning brought contrition and weeping at Bochim, with confession to God and to one another and with sacrifice.
Because the repentance was genuine, forgiving grace and the grace of Christ worked in their hearts and God forgave them.
That forgiveness produced a genuine revival and reformation that kept them true to the covenant all the days of Joshua and of the elders who outlived him.

Although the disobedience was repented of and forgiven, the seed of evil sown by sparing the nations remained and afterward sprang up to bear fruit when a new generation departed from God into mingled worship, erroneous principles, ambitious pride, and service of other gods.
Israel's tolerance of heathen injustice and participation in their degrading practices left the people oppressed when obedience would have spared them that degradation, and even when God raised up a deliverer they often abandoned him and joined their enemies.