The gemara talks about the advantages of providing food for people (le'gima). The gemara considers this to be the reason that the Torah requires us to distance Amon and Moav, and not allow them to marry into Yisroel. The Maharsha points out that the gemara indicates that this reason applies to both Amon and Moav, unlike the Ramban (Parshas Ki Teitzei) who says that Moav actually did at least sell us food. The Maharsha considers the fact that Mo'av didn't provide food for free to be a significant enough violation for the Torah to distance them, but the Ramban does not.
The Torah (Devorim 23:4-7) writes:
לא יבא עמוני ומואבי בקהל השם וכו' על דבר אשר לא קדמו אתכם בלחם ובמים בדרך בצאתכם ממצרים, ואשר שכר עליך את בלעם בן בעור וכו' ולא אבה ה' אלקיך לשמוע אל בלעם ויהפך השם אלקיך לך את הקללה לברכה כי אהבך השם אלקיך, לא תדרוש שלומם וטובתם כל ימיך לעולם
The Ramban understands that the first reason אשר לא קדמו אתכם וגו applies to Amon, and the second reason ואשר שכר עליך את בלעם applies to Moav. The S'forno has a similar approach. Although the S'forno isn't exactly like the Ramban and does hold Moav accountable for not providing food for free, the combination of the fact that they also hired Bil'am is the reason to distance them.
There are two serious questions on the reasons given by the Torah.
1. Why would the Torah stick in a seemingly superfluous pasuk - ולא אבה ה' אלקיך לשמוע אל בלעם ויהפוך ה' אלקיך לך את הקללה לברכה?
2. Why does Amon come before Mo'av since the aveira of Mo'av seems worse. Amon was a passive aggressor by NOT providing, whereas Mo'av was an active aggressor by hiring Bil'am?
The Alter from Kelm (chochma u'mussar - mama'ar 12) explains based in the Ramban that the obligation of hakaras ha'tov is so important that a passive violation of not showing hakaras hatov is worse than an active violation of hiring bil'am. In the zechus of Avrohom, Lot was saved and they had an obligation to show hakaras ha'tov, and they did the opposite. Although both actions showed a lack of hakaras hatov, the Torah is specifically trying to teach that a lack of hakaras ha'tov, even passively, is deserving of being distanced from klal yisroel forever.
It seems to me that it is for this reason that the Torah goes out of its way to say that the hiring of bil'am to curse Yisroel wasn't effective. Had the Torah not pointed this out, the implication of the passuk would have been that we distanced them because of the damage that they caused us. The Torah therefore writes that they didn't damage us because Hashem refused to listen and turned the curses into blessings. Ultimately, the hiring of Bil'am benefited the Jews and didn't cause us any damage, yet we distance Mo'av - it is not because of their actual impact, rather because of their lack of hakaras hatov.