I'm pretty sure that societies have had social pressure for not interacting with people who society frowns upon as long as there have been societies. If anything, the "affairs of the state" that handle a lot of this nowadays developed because of the social pressure, not the other way around. Social media didn't somehow invent the idea of societies shunning people that are not deemed acceptable, although it did probably make it more visible.
I'm pretty sure that societies have had social pressure for not interacting with people who society frowns upon as long as there have been societies. If anything, the "affairs of the state" that handle a lot of this nowadays developed because of the social pressure, not the other way around. Social media didn't somehow invent the idea of societies shunning people that are not deemed acceptable, although it did probably make it more visible.