In the book of judges this fact is brought out time and time again, but it's equally true now, even if we don't have a written commentary to remind us of the fact. This is an important thing to be reminded of in this day and age, when there's a real sense of meaningless in the lives of people. People look at history and see the endless repetition of failure and error, of wars and lawlessness, of futility and hopelessness and they think that there can't be any point to life. So they turn to a search for pleasure or they go after New Age philosophies, looking at their stars or clinging to crystals in a search for hope, or else they simply give up and opt out of life. But the biblical view of history as we find it in Judges is that we're not alone.
History does have purpose.
God is in control. But if God is in control, one area where we see that in action is in his response to our sin. There's a clear link in Judges between the rebellion of Israel and the withdrawal of God's protection. In fact in many cases it's put stronger than that. God actually takes the side of their enemies in order to chastise them.