You mean like a government?
What I am referring to is a group that makes people accountable for behavior that is legal by the definition of the law, but is otherwise considered anti-social and should be discouraged through shaming or loss of status.
In the past, it would have been a church, a social club, or in a small town, the town itself.