"They served their idols. Rabbi Yudan said: We pair ourselves with them and say, 'They are like us.' As it is written, 'And it became a trap for them' (Psalms 69:23). Many times He would rescue them. How many times they would anger the Holy One, blessed be He, and He would still have mercy on them and rescue them from their distress (Judges 6:6-7). And the children of Israel did evil in the eyes of the Lord. And what is written? 'And Israel was greatly impoverished' (Judges 6:6), like it says (Leviticus 14:21), 'And if he is poor.' He would many times rescue them.
Israel's Cyclical Pattern of Sin and Return to God
Midrash Tehillim 106:8