My understanding is that pre-WW2 Europe you had community groups that dealt with their people. So in a Jewish neighborhood, you had powerful Rabbis or other religious leaders that dole out law. These unofficial community leaders were given a lot of autonomy as to how to deal with their subjects. You see hints of that today in Jewish neighborhoods in Brooklyn where you have un-offical private police [0]. I don't think its as simple as saying they were excluded or ghettoized.
But that begs the question, what does it mean to be a country? Some people think its just magical land, like you step onto the country, get a piece of paper that says you're from that country and that's it. I think every country has a cultural identity. Much less so for America, since its the only country I know of where you can call yourself American despite not being born there or have any blood relatives from there but no one would bat an eye. But even there, some things are anti-American. Things like women being second class citizens (e.g. women can't drive or are forced to cover up). Or lawlessness (e.g. riding illegal scooters the wrong way down the street).
I think its perfectly reasonable to say that if you don't accept a countries values, you should not be allowed to move there. If you want to treat women like second class citizens or don't have respect for private policy or rule of law, you shouldn't be allowed to come to law abiding Western country.
https://www.nytimes.com/2016/06/18/nyregion/brooklyns-privat...