'Germany' wasn't a country until the 1870's. Officials like Bismarck were faced with trying to invent a unifying social construct to bind all the disparate political entities and city states into a new shared national identity under the Hapsburg Crown. This in turn became an exclusionary function where non-German tribal peoples became 'foreigners' and ultimately 'outsiders'. The Jewish propensity for thousands of years to self-segregate themselves from the 'goyim' population into their own ghettoes in foreign cities like Vienna and London to avoid their culture being 'tainted' went a long way toward making them suspect. The myth peddled now is that they were forced into ghettoes cuz evul Xian bigotry n stuff, but it was Jews themselves early on that demanded their own exclusive neighborhoods. As the centuries went by they of course got crowded and their own prejudices bit them in the ass. The Nazi Party merely built on what was already a feature of German national identity.
This was also common in the U.S. among the wave of immigrants, mainly because of language issues; some major cities had ghettoes of foreigners, like German and Italian Harlem in NYC, China towns, etc.