Romans 3:25 (previously cited in the thread) says that God makes Christ the "mercy seat/ilastirion/propiatiation" so that by faith in His blood God's anger is held back.
So likewise, Moses "stood in the gap", and God did not destroy the Israelites.
Sodom and Gommorah would not have been destroyed if there were even 10 righteous people there ...
Here is a bit on the idea of Penal Subsitutionary Atonement and disagreements ...
Orthodox Problems with Penal Substitution (Substitutionary Atonement)
So only to point out that this teaching (PSA) is a particular view of the Holy Scriptures.