The Lord told Judah what He expected from them, that they should show justice, mercy, compassion, nor were they to oppress the fatherless and the widow, the alien or the poor, and they were not to plan evil against their brothers (Zechariah 7:9, 10), but they refused to obey Him, and He punished them just as He had said.
That punishment included this,
“But I scattered them with a whirlwind among all the nations which they had not known. Thus the land became desolate after them, so that no one passed through or returned; for they made the pleasant land desolate” (Zechariah 7:14).
Why do nations suffer in one form or another? Not every time, but often the citizens of a nation suffer collectively for failing to live in peace with one another.