In these passages is the account of the following cycle continuing with Israel: Israel would turn away from God to serve idols and demons. God would punish them through other nations who oppressed Israel. Israel would cry out to God for help. God would provide a judge to lead a rescue. The judge would serve for a period and die. The people would again turn away from God.
God seemed always to be rescuing Israel after He punished them. That has been the pattern throughout Israel’s history. I am amazed at how compassionate, forgiving, and patient God really is.
There is a similar pattern with today’s believers. When a believer turns away to sin, God will punish the believer. However, God will forgive the person if he or she repents and turns to back to God. When the person again walks rightly before God, God’s blessings will return.