The destruction of Sodom brings together a moment of fierce divine judgment and a hidden spark of grace. God acted with strict justice in bringing about this heavy punishment [רש ר הירש]. The total ruin of the area was tied directly to its location in the Land of Israel. Because the Holy Land cannot tolerate abominations, it expelled the sinners from its midst. This catastrophic event was meant to serve as a lasting warning for future generations of the people of Israel, cautioning them never to abandon the Torah [רבנו בחיי].
Despite the overwhelming destruction, Lot was pulled from the disaster at the very last moment. Commentators agree that he was not righteous enough to be saved on his own standing. His survival is credited entirely to Abraham. This shows that even in a time of intense anger, God remembers the righteous. Their merit extends to protect their relatives and those close to them, as long as those individuals are not completely wicked [תורה תמימה, רקנאטי, רד״ק]. Because Lot hesitated and did not flee right away, the devastation of the area had already begun before he escaped. Pulling him out of the active ruin required a massive, open miracle, which was only made possible by Abraham's merit and prayers [ספורנו, מלבי״ם, העמק דבר].
When considering exactly what God remembered in Lot's favor, commentators offer different perspectives. One approach suggests that Lot was saved because he originally showed kindness to Abraham by leaving his homeland in Haran to follow him [רמב״ן, רבנו בחיי]. However, many others focus on a specific act of loyalty. When Abraham and Sarah traveled to Egypt and Abraham claimed Sarah was his sister, Lot knew the truth but chose to remain completely silent. By keeping this secret to protect his uncle, Lot put himself in direct danger with the local authorities. Because Lot showed mercy to Abraham then, God showed mercy to Lot now [רש״י, צאינה וראינה, ברכת אשר]. This act of silence is often viewed as a stronger merit than his initial decision to travel to Canaan. Following Abraham could have been driven by personal motives, such as hoping to inherit his wealth, but keeping quiet in Egypt proved his genuine devotion [שפתי חכמים, גור אריה]. Ultimately, the fact that God saved Lot for such a small act highlights His deep affection for Abraham, as this memory was brought up primarily for Abraham's benefit [דברי דוד].
Although the narrative mentions the destruction of the cities where Lot lived, he actually resided in only one city, Sodom. Commentators explain that this is a common biblical style. It simply means he lived in one of the cities within that specific region, describing his general location within the broader area that was destroyed [אבן עזרא, חזקוני, רלב״ג, הטור הארוך].