A new stage of human government began in the Book of Judges. This was also a temporary solution to a perennial problem. When people turned away from God, they lost God’s protection and were invaded by enemy nations.
Then the LORD raised up judges, who saved them out of the hands of these raiders (Jud 2:16).They needed a military leader to deliver them from these attacks.
Unlike their fathers, they quickly turned from the way in which their fathers had walked, the way of obedience to the LORD's commands. Whenever the LORD raised up a judge for them, he was with the judge and saved them out of the hands of their enemies as long as the judge lived; for the LORD had compassion on them as they groaned under those who oppressed and afflicted them (Jud 2:17-18).
The title of the judges is a bit confusing. Some had started their careers as judges applying the law amongst the people when God turned them into military leaders to deliver the people. However, whatever their origin, they were military leaders.