Rabbi Sorotzkin asks why does the Torah emphasize that Lot was "at the gate of the city". Rashi says that this means that he had been appointed a judge. Rabbi Sorotzkin states that Lot was an "honest" judge and could not be bribed. He enforced the law impartially without fear or favor. Until then, the judges could be bribed and would let people off. That meant that people who had committed the "crime" of having guests would be allowed to go free. This postponed the doom of S'dom. Once Lot became the judge and could not be bribed, there was no longer a source of merit in the city and it's fate was sealed.