The Lord’s judgment here is full of irony: he decides to ensnare his people in their own folly. Their sin came back to haunt them. Since they had taken the easy way out and spared the Canaanites, their new neighbors would prove to be a troublesome burden to them. The Hebrew text of Judges 2:3 literally reads 'they will be as sides to you,' but this apparently is an abbreviation for 'they will be thorns in your sides' (cf. Joshua 23:13; Numbers 33:55).
1 We can almost envision the Canaanites “walking side by side with Israel, tripping them up. Oxen are yoked side by side, so that for the Canaanites to be in the side of Israel implies that they were now unequally yoked together with unbelievers
(2 Corinthians 6:14)."2
If God’s people are tolerating paganism in their midst, then he will allow them to fall under the sway of the Canaanites and their false religion. The Israelites would be infected by the Canaanites’ idolatry and would suffer incalculable spiritual harm. The people would come to realize that every departure from God’s commandments results in punishment, and that whoever makes peace with sin becomes its slave.
3
3 So now I say, I will not drive them out before you, but they shall become thorns in your sides, and their gods shall be a snare to you.”