I read that:
It was a punishment God sent upon them.
Eg: God sent plagues against Egypt and sent the angel of death to kill the first born of every Egyptian household.
The pagan ways and sinfulness of the Egyptians brought God’s wrath upon them.
Likewise: at Fatima Our Lady said if mankind did not repent and change their ways a greater world war would come.
The Bible says, “The wages of sin is death.”
It also is a catholic belief that not one piece of dust moves on the planet without God the Fathers permission.
The Catechism says, there is temporal (earthly) punishment earned from sin.
God sent fire down upon Sodom and Gomorrah because of their sins of Sodomy.
Maybe God ignited a volcano or maybe it was miraculous fire from Heaven.
In a similar way God brought just punishment on the lands the Israelites were to possess. The Israelites was Gods tool to do this, just as he also may have used volcano or fire from Heaven against Sodom and Gomorrah. Just like the angel of death was his tool in killing the first born son of each pagan Egyptian household.
God’s justice is Holy the Bible says.
Later God revealed his Mercy to us through his son Jesus.
Before Jesus there was no atonement for sin really, nothing could pay back to God what was lost, because we owed God everything that he had already given us, before the fall. When Jesus was sent, Mercy was sent to the whole world. And Jesus sent the fire of the Holy Spirit to help us, rather than the fire of justice.
And yes, God is always merciful to those who repent. Even in.the old Testament.
God the Father is merciful.
He sent us Jesus to save the sinners of this world,
To suffer for them in His Son,
To pay our price for us and open Heaven for us.
Heaven was closed from the fall of Adam until the death of Jesus opened Heaven’s gates again.
God is amazing and loves us.
Jesus told St Faustina “When someone implores My Mercy, I cannot punish them,” (repentance, confession etc)
Jesus also told her “My Justice is even merciful, it cause Souls to run to the hands of My Mercy.
Souls have two choices, to run to the hands of My Mercy or to the Hands of My Justice”
St John Bosco saw a vision, that God’s justice follows those who deliberately choose hell up until the last moment.
We have a choice to choose God’s Mercy or justice.
To choose sin or virtue.
To choose Heaven or Hell.