(Devarim 23:5) "Because they did not greet you with bread and with water": Not only because of this, but also because of the counsel (of hiring Bilaam against you [Ibid.]), viz. (Michah 6:5) "My people, hear now, what Balak king of Moav counseled, etc."
(Devarim, Ibid.) "on the way": at the time of your being tossed about.
"when you came out of Egypt": at the time of your redemption.
"and that he hired against you Bilaam the son of Be'or": (this being the "Because" of Bilaam).
(Devarim, Ibid. 6) "And the L-rd your G-d did not desire to heed Bilaam … and He turned the curse into a blessing for you" — whereby we are taught that the curser is cursed. Why? "For the L-rd your G-d loved you."