Point being, God CLEARLY commanded his people to stay away from foreigners, so they were only following orders. It's why most orthodox Jews are STILL reluctant to even TALK to shiksa (Gentile) women, since it might lead to temptation to sin and marriage. Jesus was breaking tradition by daring to talk to a shiksa, but he was playing with temptation by doing so.
I don't think forbidding marriage vs not interacting/staying away from foreigners are the same thing. You can surely interact with them, treating them kindly as you treat any other. Marrying or not marrying foreigners does not prevent that. Remember God reminded them that once they were foreigners as well, so I am sure they are very much familiar how they were treated then (in Egypt), and now how they would like to treat other "foreigners". The problem IMO is man's interpretation of the scripture. (which I admit IMO is very tricky, you definitely need to know the CONTEXT) In the gospels, the Pharisees was an example of a group taking a certain commandment and interpreting it to rule every aspect of everyday life, even the most trivial things, ultimately denying what was essentially important:
16 “Woe to you, blind guides! You say, ‘If anyone swears by the temple, it means nothing; but anyone who swears by the gold of the temple is bound by that oath.’ 17 You blind fools! Which is greater: the gold, or the temple that makes the gold sacred? 18 You also say, ‘If anyone swears by the altar, it means nothing; but anyone who swears by the gift on the altar is bound by that oath.’ 19 You blind men! Which is greater: the gift, or the altar that makes the gift sacred? 20 Therefore, anyone who swears by the altar swears by it and by everything on it. 21 And anyone who swears by the temple swears by it and by the one who dwells in it. 22 And anyone who swears by heaven swears by God’s throne and by the one who sits on it.
23 “Woe to you, teachers of the law and Pharisees, you hypocrites! You give a tenth of your spices—mint, dill and cumin. But you have neglected the more important matters of the law—justice, mercy and faithfulness. You should have practiced the latter, without neglecting the former. 24 You blind guides! You strain out a gnat but swallow a camel. - Matthew 23
The WTS and other organizations comes to mind in the modern day.