The sefer אמרי שפר here writes that his father explained that it is well known that the reason for the mitzvah of accompanying someone at the beginning of their journey is in order that the merit of the one escorting should affect the escortee. We see this with Naomi that when she told Ruth to go down to the threshing-floor where Boaz was, she said (Ruth 3,3) “and I will go down to the threshing floor” instead of saying "you will go down", because, as Rashi explains, she was saying "my merit will go down with you" - and so you should not be afraid that something bad will happen on the way.
Similarly, we find in the Torah in the section dealing with the Eglah Arufah that the elders of the nearest city had to stand next to the corpse and announce (Devarim 21,7) “our hands did not spill this blood”. Rashi comments: Would it enter one’s mind that the elders of the court are murderers? Rather, what they were saying was that they did not see him and let him depart without food and without an escort. The implication is that if they had sent him away without an escort they would have caused his death and been like murderers, because if they had accompanied him their merit would have gone with him and so his murder would not have happened.
From all this it is clear that the merit of the one escorting influences the escortee in his journey, and for this reason Chazal commanded us in the mitzvah of escorting.
Therefore, when the angels wanted to go to S’dom to destroy it they had a problem, because Avraham was escorting them to send them on their way and he was a man of Chesed (loving kindness). Thus his escorting would influence them with Chesed so that they would not be able to destroy S’dom. Because of this “the men arose from there and looked upon S’dom”, but they did not yet go there because Avraham went with them. Instead, they waited until Hashem came to speak with Avraham about S’dom, and then they had the opportunity to go to S’dom because “Avraham was still standing before Hashem”.