This will be the first of two posts. This one will summarize what we know about the connection between punishment and providing public goods. The follow-up post will be in ~meta and will be my thoughts on how this applies to Stacker News, specifically.
For the sake of brevity and clarity, I speak a little loosely in parts.
What are public goods?
A public good is an economic good that is neither rivalrous nor excludable in consumption. Ok, what does that mean?
-
Economic goods are anything with a positive equilibrium price; i.e. things people are willing to pay for.
-
Rivalrous goods can only be used by a single person; i.e. one person's use precludes someone else's use.
-
Excludable goods can only be used with the permission of the seller.
So, a public good is something valuable that is available to everyone and usable by everyone. A common example of a public good is radio broadcasts. Once it's put out there anyone can receive it and my use won't prevent yours.
The concern with public goods is under-provision. That's because each of us has an incentive to not pay for it, since we'll get it either way (as long as someone pays enough for it to be produced). That's the Free Rider Problem.
There are many possible entrepreneurial solutions to overcome this (like inserting paid ads into the broadcast). Quick aside: the intentional combination of an economic good (the radio program) with an economic bad (the ads) is sometimes called a "kludge".
The role of punishment
Another solution to certain public goods situations, is to punish people for not chipping in. I'm most familiar with this in the setting of subsistence communities. Often, these communities have a communal food distribution because that acts as insurance for those who tried but had poor luck at hunting or fishing or whatever it is.
Because they've created a public good out of their food supply, each member of the community now has an incentive to put in less effort, because they'll get to eat either way. If everyone shirks, though, there won't be enough food for the community. That's why shirking tends to be heavily punished in these communities. That punishment will generally come in the form of some type of ostracism, possibly including loss of access to the communal food.
In that scenario, the public good was an artificial construct in the first place, so it was possible to exclude the bad actor. Also, as some of you probably thought, that food ends up being rivalrous if not enough was produced.
Still, one way to deal with free-riding is to punish it sufficiently that it's preferrable to just do the work.
Punishment itself can be a public good
A punishment like ostracism is also costly to the punisher, assuming they value that relationship. I may be tempted not to ostracize my lazy friend, which makes him less likely to change his ways. If I choose to ostracize my friend, the cost is borne by me, but I share the benefits with the rest of the community.
There are also scenarios where it's sufficient for one person to implement a punishment. This is basically the situation with criminal punishments. If I lock someone up for their antisocial behavior, the whole community benefits, but it comes at great expense to me.
TL;DR
In the context of producing public goods, punishing non-producers is itself a public good, because it produces benefits that are accessible to everyone. That means there likely won't be an optimal amount of punishment (dispersed benefits and concentrated costs), unless some other layer of compensation develops for those who do the punishing.
Referrences
Here are some publicly available sources for those who want to do a deep dive on the topic. I was initially going to tie them into this post, but I got carried away with my stream of consciousness and said most of what I wanted to say.