An Amoni or a Moavi shall not enter into the assembly of the LORD… because they met you not with bread and with water in the way, when ye came forth out of Egypt; and because they hired against thee Balaam the son of Beor from Pethor of Aram-Naharaim, to curse thee. (Devarim 23:4-5)

The Torah tells us that we should look at certain nations in a negative light because they did not treat Klal Yisrael properly.

Neither an Amoni nor a Moavi can come into Klal Yisrael because they did not do chesed to greet us with bread and water – the bare minimum of hospitality. The Torah continues with another reason – because they hired the wicked Bilaam to curse us out of existence.  The Dubno Magid asks why are there two reasons? The fact that they hated us to the point that they wanted us obliterated from the world seems a sufficient reason on its own. Why does the Torah bother to tell us about a seemingly inconsequential reason (the lack of hospitality) in order to explain why they can never become part of our nation?

If I recall correctly, there are those who answer  that Chazal say that the descendants of Avraham Avinu must be ones who actively do chesed. Since these two nations showed that they did not have any inclination to do chesed, they simply don’t have the genes to fit into Klal Yisrael. The fact that they wanted to kill us showed no ‘genetic flaw’ in them, as this is normal of anyone wanting to protect their land.

However, the Dubno Magid explains this differently. Sometimes a person does not do chesed and we may look at him negatively, but we are unaware of the fact that it was not actually in his power to do the chesed. He relates the following tale. A rich man went to the Rosh Yeshiva and asked him for a student wit