Of course it can be said of jails, too, that they try - by punishing the troublesome - to deter others. No doubt, in certain instances this deterrence actually works. But generally speaking it fails conspicuously.
The Jews are the living embodiment of the minority, the constant reminder of what duties societies owe their minorities, whoever they might be.