The Israelites in the wilderness did not receive even elementary humanity on the part of some of the desert tribes. The Moabites provided bread and water, though for a price (Deut. 2:29). The Ammonites did not even do that much.
These tribes could not have been expected to love and cherish the Israelites and treat them as welcome guests, but they could at least have acted with a modicum of basic decency. To bring such people into the Israelite fold by means of marriage would be to lower the ethical standards of Israel.
If someone is hungry and thirsty, the Jewish ethical conscience immediately comes forward with food and water. If a Jew fails to act in a humane way, their Jewishness does not appear genuine.
There is a modern application of this teaching. In Australia and elsewhere there are refugees who were not invited to come, but they are there, and while their applications for permission to stay are undergoing due process, they have to be treated with basic decency and be given access to food, clothing, health care and education.
It is said that some are not genuine refugees and some may even have been planted there with hopes of setting up criminal cells. All of this reinforces the need for full and proper screening. But in the meantime, the modern equivalent of the Biblical bread and water must be assured.