The story of the angelic visit to Sodom becomes a parable: a parable about Lot in Sodom. And a parable about Sodom itself as well. Earlier, during the angels' conversation with Abraham, the question arose of how many righteous people were needed to save the city. The conversation stopped when the number reached ten. Why? The reason is that, according to the religious rules of Judaism, ten people are the necessary minimum for a community. Ten adult Jewish males who have gone through the bar mitzvah rite, when gathered together, constitute a full community that can perform any religious ritual, except, of course, those requiring the participation of a Levitical priest. In the days when the Book of Genesis, as we know it today, was being written, this rule already existed. Thus the author of the Pentateuch is telling us: one righteous person, or even several righteous people, are not enough to save a city. What is needed is a community that could act in that city as a single spiritual whole, and then it is possible that, for the sake of His community, God would preserve the city itself and not let it perish.
Meanwhile, there turned out to be no such community in Sodom. There was only Lot with his family, but one family is not enough to turn the situation around. Lot most likely did not immediately understand whom he had sheltered in his house, but from the very beginning he behaved as a righteous man, ready to defend his guests before God and people to the end, using every possibility. No other righteous people were found in the city.
In such a situation it proved simpler to lead Lot and his family out of the city, giving all of them the opportunity to be saved. There was, however, one condition: they had to leave immediately, go away quickly, and not look back, not because God could not wait an extra hour, but because when the matter concerns a city perishing from its own sin, one has to leave at once, without trying to carry anything along even inwardly. Otherwise there is a chance of taking with you the very thing you are leaving.
It is a harsh situation, but no surprise: from the beginning Lot went to Sodom not after God, but after a comfortable life. Yes, he had kept the habits of righteous living, but for that very reason he had to part quickly and unexpectedly with the comfortable life he himself had chosen. Yet the quick and unexpected parting saved him from death in the doomed city. That was the choice Lot had to make, and make quickly. Lot made his choice and remained alive.
