In Parshas Vayeira, Avraham interrupts a visit from G‑d Himself in order to host three passersby (angels disguised as travelers). This teaches us the tremendous value of the mitzvah of hachnosas orchim, hosting guests. Per the Rambam:
This is the tenet that our patriarch Avraham established, and the path of kindness that he followed. He would feed wayfarers, provide them with drink and accompany them. Showing hospitality for guests surpasses receiving the Shechinah, the Divine Presence, as is written: ‘He saw, and behold, there were three men.’
Yet considering that Avraham’s guests were actually angels, who had no need for the food and drink he offered, did Avraham actually fulfill the mitzvah of hachnosas orchim with this act of hospitality? In hindsight, it seems that Avraham disturbed his meeting with G‑d for guests who do not even qualify for hachnosas orchim!
From here we see that hachnosas orchim is defined primarily by the heartfelt concern that the host shows for his guests’ wellbeing, and not by the accommodations he provides (in which case the extent of the beneficiary’s need would be relevant). Although other acts of kindness too are certainly better with a smile than without, yet the ideal way of giving charity is actually when the donor and recipient never even meet face to face.
Not so the mitzvah of hachnosas orchim, where the fulfillment of this mitzvah is first and foremost through showing your guests your personal and sincere concern for their comfort and wellbeing.
Thus, regardless of whether the angels visiting Avraham needed or ate the food that he prepared for them, Avraham fulfilled the mitzvah of hachnosas orchim to the fullest with the care he exhibited toward them. Moreover, knowing (better than anyone) just how much Avraham was cherished by G‑d, the guests too could appreciate the sincere interest this great man took in them, putting his meeting with G‑d on hold in order to provide them with food and to escort them on their way.
—Likkutei Sichos, vol. 25, pp. 76–78