The Old Testament illustrates how the Jewish people would enjoy God's protection for a time, but every so often they would stray and God would have to chastise them to remind them of His covenant with them.
God uses chastisements rather than condemnation, because chastisement allows for forgiveness. But forgiveness is not possible without repentance.