Following the death of Joshua and the generation of Israelites that were obedient to God in entering the land that was promised to Abraham, Isaac and Jacob, the next generation abandoned the faith and obedience to God of their parents. They worshipped the various gods of the people around them.
When the Israelites fought to defend themselves against invaders, God fought against them and the Israelites were defeated. The Israelites suffered under the oppressive rule of the invaders. When the Israelites turned to God for help, he raised up Judges to lead them in obedience to God. When the Judge died, the Israelites returned to their evil ways. This cycle was repeated numerous times. [Reflection based on the Bible Reference – Judges 2:8-19]