Here is a theological assertion for a day:
There is never a time in the Scripture where God executes a punishment that is not also designed to work salvation for His people.
I think this is important because we can end up putting God's Wrath, God's Anger, God's Punishment off in an abstract box, as though this somehow describes who God is or what He is like. We forget that these things - wrath, anger, punishment are always in relation to sin. It's not as though God is just sometimes wrathful; He executes wrath upon sin.
And sin is not just some neutral, moral category describing X number of bad things. Sin is the enemy that seeks to enslave and destroy you. And God will not have that... so there is wrath and anger and punishment, but however that plays out, it plays out for your salvation.
God really does work all things for your good.
Go out of the garden, because you will receive salvation via the Messiah, not your own works.
Pain will increase in childbearing, but the Son will be born.
You will eat bread, but Christ Jesus will give you Himself and forgiveness in bread.
The flood drowns wickedness but saves and rescues Noah.
The fire and brimstone delivers Lot from Sodom.
The Red Sea drowns pharaoh but rescues Israel.
See the pattern. Even to the ultimate emblem of God's wrath and anger and punishment - the Cross. It is wrath and anger and punishment - but it is for your good to deliver and rescue you.