This Parasha (Torah Portion) includes many Mitzvor (commandments) including rules of war, rules regarding how to deal with a rebellious son, laws regarding the return of lost items, laws of Tzizit (four cornered garment), laws regarding Shatnez (binding together of wool and linen), laws regarding proper payment of workers, laws regarding converts from the nations of Amon, Moav, Egypt and Edom, marriage and divorce, familial obligations towards a widow of a man that died childless, the commandment to wipe out the menory of the nation of Amalek, and many other commandments.
"An Amonite or Moabite shall not enter the congregation of Hashem, even their tenth generation shall not enter the congregation of Hashem, to eternity, because of the fact that they did not greet you with bread and water on the road when you were leaving Egypt, and because he hired against you Balaam son of Beor, of Pethor, Aram Naharaim, to curse you... You shall not seek their peace or welfare, all your days, forever. "( Deuteronomy 23:4-7)
The males of the nations of Amon and Moav are cursed with the prohibition to marry into the Jewish Nation even if they choose to convert, and even for many generations to follow. The first reason for this harsh curse is, as mentioned above, as a punishment for the fact that those very nations did not offer sustenance to the Israelites as they passed through their land on the way out of Egypt. At that time, on the eve of entering the pormised land. the Torah recounts (Deuteronomy 2 :9) that the Israelites were commanded not to enter into war with these nations as opposed to the destructive battles that the Israelites fought with Sichon and Og. As such, the Amonites and Moabites should have shown some sign of appreciation for having been saved and therefore have provided food and drink. Also the Moabites and Amonites were the descendants of Avraham's nephew Lot, whom Avraham fought to save ( in the war of the four kings vs. the five , Genesis 14) and as such should have shown some appreciation by being hospitable to the wandering descendants of Avraham. This act of lack of appreciation was one that affected many generations to follow. Our Rabbis point out that in Deuteronomy 2: 28-29 we learn that the Moabites did actually sell the Israelites bread and water. Some explain, according to the second reason mentioned in the quote above, that the Amonite and Moabites were cursed for their role in bringing the Israelites to sin with the Midianite woman. Others explain that the Amonites and Moabites sinned in that they sold and took money for food when they should have offered it as a repayment for the good that was done for them, and therefore they were cursed with this very serious and long lasting curse as a punishment for being unappreciative. From this we may learn the great importance of being appreciative in addition to the great wisdom as expressed in the the book of Mishlei (17:13) in which we read " One who repays good (actions) with bad , the bad will never be (re)moved from his house."
Another important idea that we learn from this Torah portion is that the sin of one who causes others to sin is greater than the sin of one who kills another. We see that the Egyptians and the Edomites who were responsible for killing many of the Israelites are only forbidden to join the Jewish Nation for three generations, while the Ammonite and the Moabites that entice the Israelites to sin are forever banished from eligibility to join the nation. The reason, according to Rashi, is that one who murders removes their victim from this world, but one that entices to sin removes their victim from this world and from the the next.