Avraham’s nephew, Lot, represents the search for gashmius, for fertility beyond all else. It is the fertility of Egypt that attracts Lot, and that same fertility is what brings him to Sdom. As Lot’s very essence, the desire for fertility in all times and all conditions leads him to impregnate his daughters, even after the cautionary tale of his wife, who changes from a fertile woman to the very essence of infertility — salt, which was well known in the ancient world as the key ingredient to poison the soil.
So Lot’s kids get a double dose of Lot’s Gashmiyus, and we get Moav and Ammon. Moav’s concern in the beginning of Balak is Lot’s concern, too: “the greenery of the field.” And in the ancient world, the land to the south and east of Ammon (the origin of the modern city of “Amman”) is distinguished by its fertility. Both Moav and Ammon are lands characterised by natural wealth, and ironically (considering the fate of Lot’s wife), Moav’s economy benefits from the trade in salt from the dead sea region.
Then there is the sexual element. Lot represents the desire for fertility above all else, and his descendants represent the most basic, animalistic elements of sexual desire and even perversion, hence the cult of Baal Pe’or. The daughters of Moav being used to corrupt Jewish males is Lot’s attempt to sway Avraham back off course, toward rampant hedonism.
What possible claim did Lot have to the inheritance of Israel? Arguably he had the same claim as did Sarah herself. While we consider ourselves the ancestors of Avraham, that is only part of the story. As Leibtag points out, all Jews are actually descendants of Avraham’s *father*, Terach, and the reason for this is because 3 of the 4 mothers, Rivka, Leah and Rachel, were not descendants of Avraham but were descendants of his brother: Nahor. So we see the importance of the phrase “These are the generations of Terach,” not “These are the generations of Avraham”.
But Terach did not have only two sons: he had three. And the third son was Haran, whose children included Sarai (Iscah) – and Lot.
It would not be unreasonable, therefore, for Lot to expect an inheritance. He was descended from Terach, and all the other male offspring from Terach were members of the tribe, so to speak. Perhaps Lot was never meant to be rejected from the birthright of Avraham, that had he stayed with Avraham, his descendants might have been equal members of the nation of Israel.
Lot gets his inheritance. In the right time, and in the right way, we have the “two doves” of Ruth, the Moabite, and Naamah, the Ammonite — each responsible for becoming a part again of the Davidic line of Israel: Ruth’s descendants include David, and Naamah’s child with Solomon is Rehoboam. These two women represent the healing of Lot’s sin, the folding back of Lot into the Jewish fold and inheritance of Avraham.
Why Ruth and Naamah? We don’t know as much about Naamah, but Ruth is a wonderful contrast to the daughters of Moav as seen in parshas Balak and Matos. Instead of being a voracious, animalistic sexual creature, Ruth is no less sexual — but is demure and modest, the very model of how to take the appetites we are given, and to direct them toward holiness. She has the same fertility of Lot’s daughters (one incident leads to offspring), but everything about her scene with Boaz is beautiful and infused with holiness. Ruth takes the sin of Lot and his daughter, and is a tikkun for it. Or as Boaz puts it when he welcomes her to his field, “G-d should recompense thy deed, and make a full reward.” In the Hebrew, both recompense and reward come from the same root: shalem. G-d should make Ruth whole, that He should recognize that Ruth is correcting the Moabite defect in her past.
This may explain why Ruth and Naamah are referred to in the Gemara as the “two doves” – when a woman brings an offering after she gives birth, that offering can be a pair of turtle-doves, showing an acknowledgment that fertility comes from Hashem, and has been, in turn, properly directed in the paths of Hashem.
Ruth’s materialism is also a contrast to that of Lot. She turns away from the trade in salt offered in richer Moav, and works in the field, taking charity from others. She then, again in contrast with Lot, shares the fruits of her labor generously with her mother-in-law. Lot, his defects corrected, receives his inheritance and becomes folded into the Jewish people.
We see, therefore, that converts to Judaism, by correcting the defects within their own past, have brought essential elements into the highest levels of Jewish society and service to Hashem.