God destroyed Sodom and Gomorrah because of His love for His children. This may be a little difficult to understand on the surface, but we are to remember that God’s ways are higher than ours. The thought of this chapter begins by reading Verse 12 then skipping to verse 18. Verses 13 – 17 are parenthetical.
The quoted verse speaks of the Mosaic Law which was written in stone. But before that law, don’t assume there was no law. There already was a law in effect. This was the law written in the hearts of man. “…Gentiles, who do not have the law, do by nature things required by the law, they are a law for themselves, even though they do not have the law. They show that the requirements of the law are written on their hearts…” Romans 2:14, 15 (NIV).
Yes, when Adam was created, he was created in God’s image meaning he had God’s laws of love and justice written within his heart. The just death penalty for sin had already been meted out to Adam. Therefore, Sodom and Gomorrah and even the entire human population were/are subject to Adamic death due to sin. (Vs 12) “Wherefore, as by one man (referring to Adam) sin entered into the world, and death by sin; and so death passed upon all men, for that all have sinned.”
The families of Sodom and Gomorrah were already going to die. So your real question should be why did God destroy them instead of letting them live out their days? Skipping to Verse 18 “Therefore as by the offense of one The free gift of life will apply to all mankind in the future resurrection. But each individual will have to come to righteousness to keep that life. God saw the wickedness in Sodom and Gomorrah and their downward path of sin and immorality. Their lives were cut short to prevent further degradation to themselves and their children. Thus they were not permitted to corrupt themselves beyond repair.