A Commentary, Critical, Practical, and Explanatory on the Old and New Testaments, by Robert Jamieson, A.R. Fausset and David Brown  at sacred-texts.com
deu 23:1WHO MAY AND WHO MAY NOT ENTER INTO THE CONGREGATION. (Deu. 23:1-25)
He that is wounded . . ., shall not enter into the congregation of the Lord--"To enter into the congregation of the Lord" means either admission to public honors and offices in the Church and State of Israel, or, in the case of foreigners, incorporation with that nation by marriage. The rule was that strangers and foreigners, for fear of friendship or marriage connections with them leading the people into idolatry, were not admissible till their conversion to the Jewish faith. But this passage describes certain limitations of the general rule. The following parties were excluded from the full rights and privileges of citizenship: (1) Eunuchs--It was a very ancient practice for parents in the East by various arts to mutilate their children, with a view to training them for service in the houses of the great. (2) Bastards--Such an indelible stigma in both these instances was designed as a discouragement to practices that were disgraceful, but too common from intercourse with foreigners. (3) Ammonites and Moabites--Without provocation they had combined to engage a soothsayer to curse the Israelites; and had further endeavored, by ensnaring them into the guilt and licentious abominations of idolatry, to seduce them from their allegiance to God.
deu 23:3even to the their tenth generation shall they not enter--Many eminent writers think that this law of exclusion was applicable only to males; at all events that a definite is used for an indefinite number (Neh 13:1; Rut 4:10; Kg2 10:2). Many of the Israelites being established on the east side of Jordan in the immediate neighborhood of those people, God raised this partition wall between them to prevent the consequences of evil communications. More favor was to be shown to Edomites and Egyptians--to the former from their near relationship to Israel; and to the latter, from their early hospitalities to the family of Jacob, as well as the many acts of kindness rendered them by private Egyptians at the Exodus (Exo 12:36). The grandchildren of Edomite or Egyptian proselytes were declared admissible to the full rights of citizenship as native Israelites; and by this remarkable provision, God taught His people a practical lesson of generosity and gratitude for special deeds of kindness, to the forgetfulness of all the persecution and ill services sustained from those two nations.
deu 23:9When the host goeth forth against thine enemies, then keep thee from every wicked thing--from the excesses incident to camp life, as well as from habits of personal neglect and impurity.
deu 23:15Thou shalt not deliver unto his master the servant which has escaped from his master unto thee--evidently a servant of the Canaanites or some of the neighboring people, who was driven by tyrannical oppression, or induced, with a view of embracing the true religion, to take refuge in Israel.
deu 23:19Thou shalt not lend upon usury to thy brother . . . Unto a stranger thou mayest lend upon usury--The Israelites lived in a simple state of society, and hence they were encouraged to lend to each other in a friendly way without any hope of gain. But the case was different with foreigners, who, engaged in trade and commerce, borrowed to enlarge their capital, and might reasonably be expected to pay interest on their loans. Besides, the distinction was admirably conducive to keeping the Israelites separate from the rest of the world.
deu 23:21When thou shalt vow a vow--(See on Num 30:2).
deu 23:24When thou comest into thy neighbour's vineyard, then thou mayest eat grapes thy fill at thine own pleasure--Vineyards, like cornfields mentioned in the next verse [Deu 23:25], were often unenclosed. In vine-growing countries grapes are amazingly cheap; and we need not wonder, therefore, that all within reach of a person's arm, was free; the quantity plucked was a loss never felt by the proprietor, and it was a kindly privilege afforded to the poor and wayfaring man.