One of the ways in which cultures police themselves and enforce cultural norms of behavior is by defining who gets to live in a society, and who is not allowed to take part. Shunning people who fail to behave in culturally acceptable ways is known throughout the world and from all periods of history. Sometimes it's done as a means to enforce unwritten types of cultural conformity, and other times it's done to enforce written laws.
We don't tend to think of it as something that is done in any sort of formal way in our society, however. It might surprise many to know, then, that a form of shunning is currently being debated for its constitutionality in the state of Georgia. Although the Supreme Court of Georgia has ruled that banning criminals from the state is unconstitutional, it has upheld the right of judges to restrict criminals to specific counties, or forbid them from entering certain regions or counties. Currently, a case involving a mentally ill defendant is making its way through the appeals process and will probably be up for consideration by the Georgia State Supreme Court.
This is an interesting question, legally and anthropologically. At the heart of this debate, the rights of the defendant to live as s/he chooses is being counterpoised against the rights of our society to be free from criminal activity performed by the defendant. That's not a small question in our culture, because we tend to prefer to uphold the rights of the individual as an ideal, versus the rights of the State.
There are also pragmatic questions to be answered if the court upholds the practice: for example, what will be penalty be if a defendant is banned from a county, and s/he violates that ban? Also, does this practice address the problem of recidivism, or does it merely ship the problem elsewhere? And finally, because most of these bannings have restricted defendants to rural counties, what sort of long-term affects might there be on these rural counties who are receiving these people?