In some parts of this country, there are enclaves of certain groups, where non-members of that group are discouraged from entering - discouraged by persuasion, intimidation, or violence.
They choose to withdraw from the mainstream, give them what they want. Fair is fair.
If non-members can't get in, then members can't get out. They can behave as they like inside the walls, and will not be interfered with or harmed, but they can't get out.
For any reason.
Don't even think about it.