In this view, legislation saying that the Jews must live in the Jewish quarter is basically analogous to legislation prohibiting incest -- it's not passed because people would be violating it otherwise, but because people feel that it reflects the proper order of the world, and it passes easily because there is no group that feels threatened by its passage.
Maybe they should have felt threatened, since the situation often persisted long after the point where it was a net benefit to the Jews, but it's hard to blame the communities of 1040 for not anticipating the problems of 1940.
You are cherry-picking facts in the extreme - the "problems of the 1940s" (you mean othe holocaust? What newspeak!) did not just pop out of nowhere, pogroms as ruler-sanctioned way of making a quick buck were a time-honoured tradition spanning the Middle Ages.
They draw that protection from the fact that they live in a cohesive group in a well-defined (though not, as far as I know, legally set) region. They are welcome to leave, but they would lose the special legal status that the Amish enjoy, and they would then be basically unable to practice their traditional lifestyle.
Are they being kept in a ghetto? Is it by our demand or theirs? Is it reasonable, if we give them their own laws, that we restrict that to a well-defined area?
> I'm looking at a handful of such comments (which call for Jewish presence as cash cows, mostly) across multiple centuries, and an avalanche of comments, texts and laws saying "get them outta here. okay, maybe let them stay this year if they pay more."
How often were they actually expelled?
> What newspeak!
I don't dispute that living in a separated community has its advantages, I don't claim that ghettoes were prisons; in fact, distancing themselves from other, um, "tribes" is even supported by the Law. I'm just deeply incredulous at the claim "we don't want to live outside at all, make it a law of the land:" there are plenty of exceptions in the town statutes saying "want a house outside of the ghetto? Pay up!"; that doesn't quite look as inside influence.
Phrased as "chosen separatenes", this is still a far cry from "separate Jewish areas due to Jewish demand, not gentile demand" - to the first part I could mostly agree, to the second, not at all (and there's plenty of textual sources spanning the entire medieval and early modern period for that). I would agree that in a situation of "live in a ghetto or not here at all" (a threat which manifested itself pretty often), the mutual support in a separated community would be welcome.