As Avraham recovers from his circumcision, the temperature gets blazingly hot, with the intention that Avraham relax and recover.
. וַיֵּרָא אֵלָיו ה’ בְּאֵלֹנֵי מַמְרֵא וְהוּא יֹשֵׁ בפֶּתַח הָאֹהֶל כְּחֹם הַיּוֹם. וַיִּשָּׂא עֵינָיו וַיַּרְא וְהִנֵּה שְׁלֹשָׁה אֲנָשִׁים נִצָּבִים עָלָיו וַיַּרְא וַיָּרָץ לִקְרָאתָם מִפֶּתַח הָאֹהֶל וַיִּשְׁתַּחוּ אָרְצָה
Hashem appeared to him in the plains of Mamre; and he was sitting at the entrance of the tent when the day was hot. He raised his eyes and noticed three men were approaching him, and he saw them. He ran toward them from the entrance of the tent, and he prostrated himself to the ground.
His location “from the entrance of the tent” is established when the setting is described, yet repeated when he departs. Why?
The Kehilas Yitzchak explains that the Gemara in Brachos teaches that one who leaves a synagogue should not take large steps while leaving - he shouldn’t appear happy when finishing a mitzvah. There is also a halacha in he Shulchan Aruch that it is a mitzvah to run towards any mitzvah.
If someone is switching from one mitzvah to another, should he run or not? A paradox is presented: if he runs, it appears to devalue the first mitzvah; if he doesn’t run, then he isn’t doing the mitzvah of running to perform the second mitzvah!
The resolution is that if the first mitzvah is greater than the second, then he shouldn’t run; so as to not devalue the first and greater mitzvah. If the second mitzvah is greater, the he should run in order to fulfill the second greater mitzvah with haste and zeal. What if the two are equal? He should walk the first half of the journey and run the second half, in this way he fulfills both his obligations.
So how did Avraham conduct his behaviour? The Gemara in Shabbos teaches that taking in guests is greater than speaking to Hashem.
If so, when Avraham went to take in guests, although previously speaking to Hashem, the second mitzvah was greater than the first, Avraham had to run the entire journey.
Therefore the Torah writes that he ran towards them to praise his eagerness to run towards the second mitzvah the entire journey; “from the entrance of the tent”.