When you tell people to look things up, be sure you first looked it up correctly yourself. That link says that ghettoes were used to protect Jews in the manner you describe. It does not say that that is why ghettoes were created.
Since I lost karma for that, I'd better elaborate. Your specific quoted line shows that protection was the reason for the ghetto's placement, given that they were going to have one. It does not say that protection was the reason for having a ghetto.
Your own link says that "Jewish ghettoes in Europe existed because Jews were viewed as alien due to their non-Christian beliefs in a Christian environment". The only mentionthat is anything like what you claim is halfway down the page, has no reference, does not name the location of the ghetto, and neither 1) says whether Jews could live only there or 2) if so, gives a reason for why they were prevented from living anywhere else.
Another month, another rationality quotes thread. The rules are: