This shows God’s grace to us. Even though we deserve conquest and annihilation as a nation and as individuals, God preserves us. It is not wrong to fight for preservation. But we too often strive for a greatness we’ve grown accustomed to, and act like we should be great again, no matter how much innocent blood we’ve shed.
This teaches us humility. God took Israel through a low time of being occupied, plundered and otherwise oppressed. But the key word is “through.” God will not abandon His people, but He may teach them humility when their ambition outstrips their obedience.