For me the question is vexingly personal as well as intriguingly theoretical: is it possible for a community to uphold general behavioral standards without imposing intolerable burdens of shame on those members who do not conform? Is it possible to teach, for instance, that children should be born to married parents without shaming, blaming, or stigmatizing single parents? The literary image of Tess Durbeyfield stumbling across the frigid English countryside with her infant wrapped in rags is seared into my imagination, and Hardy's condemnation of the obscene human costs of stigma in his society is a moral clarion. Yet contemporary culture's ongoing natural experiment in de-stigmatizing out-of-wedlock births, and the concomitant rise in those births with correlated child poverty, suggests to me that there is also a human cost to abandoning stigma as an instrument of social influence.
It's truly an open question, in my mind, which is worse: the shaming effects of social sanctions (a category in which I include discourse and representation but not law or regulation), or the undesirable social effects of softening those sanctions. For today let me make a very provisional case for the careful use of informal sanctions in the sort of benign social engineering that all functioning communities perform. (I'm taking it for granted that the ends to which social sanctions are put in my little thought experiment promote true human flourishing. That's not always the case in real life, of course, but in those situations there is no dilemma to be wrestled.)
The advantage of soft sanctions over other instruments of social control is that they work informally: rather than simply forbidding a given behavior by decree, a ham-fisted approach that leaves no room for exception, sanctions impose something like a social tax on the behavior. Take so-called "sin taxes" as an analogy: rather than outlawing the sale of cigarettes altogether, we can lower smoking rates by taxing cigarette sales, thus nudging future smokers away and perhaps giving current smokers additional motivation to kick the habit. Likewise, stigma as a social tax on adultery, say, works to nudge would-be philanderers back to the straight-and-narrow without the need for anti-adultery laws, which are clumsy, intrusive, and unenforceable.
Because social sanctions work more like a tax than a flat-out prohibition, they have the flexibility to accommodate real exigency or extenuation. Take as an analogy the notion of "congestion pricing" to control urban traffic, essentially a tax on parking or driving during peak hours. Those who really must go downtown are free to do so; indeed, their ability to do so is actually enhanced by the tax. That's because those who don't really need to go downtown will be dissuaded by the extra cost, freeing up lanes and spaces for those who do. It's not a perfectly just system: sometimes the tax falls on people who really must go downtown but find the extra cost a financial hardship. Still, the tax works pretty well to allow and discourage access according to real need.
Now think about a soft social sanction against divorce within a religious community, for example, as a kind of congestion pricing. Over-the-pulpit teachings against divorce, implicit social disapproval, conversations about the ills of broken homes: these all work as a tax on divorce, because they make it socially expensive. The social price of stigmatized divorce for an adult is shame, self-doubt, alienation: these costs are real, they are painful, they are not fair. The price is so high, in fact, that nobody would divorce unless there were real exigency. The divorce tax thus works pretty well to discourage frivolous divorce.
But what about those who find themselves in intolerable marriages and absolutely must divorce? The tax is a burden, no doubt, and sometimes it falls unjustly on women and men who are already socially vulnerable and can ill afford the social costs. But from a different perspective, the tax actually offers some moral protection to the divorced, because its very existence guarantees that the divorce was not undertaken frivolously. If there were no social tax at all, no stigma attached to divorce, then there would be no way of distinguishing the resulting frivolous divorces from the heart-breakingly necessary ones. But because the price of divorce is so high, the only people going downtown are the ones who absolutely must.
(It should be noted that even if divorce were entirely destigmatized, it would still be an inconvenient and expensive process, like most processes of family formation, and this would continue to deter some potential divorces.)
Let me revise and emphasize: in a compassionate community, the social tax offers some moral protection to those who must divorce. That is, the community ought to recognize that given its own soft sanctions against divorce, any divorce that does occur is necessary and undertaken only with great deliberation. Thus we ought to offer divorced men and women in our communities generous personal care and support, and we can do so without concern that we are somehow thereby endorsing frivolous divorce. The divorce tax takes care of that.