Public good problems are a frequent, but mistaken, argument against capitalism.
Public goods are goods where everyone in some category (usually geographic location) will gain a benefit if the good is produced, whether they pay for it or not. Thus there is a danger of "free riders" who gain a benefit but refuse to pay.
Free riders don't hurt anything directly. Who cares if some people get something for free, as long as I'm making money on the good? However, what if everyone decides to become a free rider? Then I won't get paid, and I won't produce the good, and so everyone will lose out.
Consider an example: a group of farmers live in a valley, which has seasonal floods. It is in their interest to build a dam to control the flooding. This will increase their crop yields, and they will make more money. Suppose the total benefit to all the farmers is twice as much as the cost of the dam. Then building the dam would be good. But why should I personally contribute to paying for the dam? Just like elections are rarely decided by one vote, whether I am willing to pay probably won't change the outcome of whether the dam project goes forward or not.
The claim against capitalism is as follows: there are some goods, which should be produced, and which would be beneficial and efficient, but which capitalism cannot produce at a profit due to the free rider problem. The conclusion is generally that the Government should step in, collect money from everyone in the valley, and use it to build the dam, thus helping everyone out.
Keep in mind that public goods are provided by capitalism all the time. It's ubiquitous. The public goods dilemma only says that some, which should be provided, won't be, even though many are. This is called a "market failure", and is much rarer than a market success. This particular way of criticizing capitalism can only advocate occasional deviations from capitalism in specific situations, but it wouldn't work as an argument against all capitalism. This is important to bear in mind to keep things in perspective. If they are correct then capitalism still works well over 95% of the time; it's a pretty limited criticism.
This scenario contains numerous misconceptions and the conclusion is false. Capitalism can produce a dam in that situation. The scenario assumes it's good to build the dam, but in real life we have to evaluate which projects are worth pursuing; such evaluations are notoriously error prone and difficult, and capitalism is much better than Government at them. Government intervention in that situation can and will hurt some people. Pooling money and sharing is unwise. And the distinction between a public and a non-public good does not hold up.
First, here is a simple and intuitive argument that the capitalistic approach is a good one. Suppose building the dam will provide a benefit a million times larger than the cost. It's definitely going to get built. There's not going to be a problem. There could be a bunch of free riders, and it wouldn't matter, the people paying for it get a huge return on their investment so they are happy. And the bigger the return on investment, the more people will be confident it's really going to work out, and willing to risk their own money. In short, the more beneficial the project is, the easier it is to overcome the public goods dilemma.
But what if the dam will cost $100, and will provide $101 of benefit? With such a low margin of error, capitalism can't be expected to build it. It's too much trouble to organize all the farmers and get them all to pay, and if only a few farmers don't pay then there will be no benefit left for those who do pay.
Let's think about what we've just said. The better the project is, the easier it is to get it to take place under capitalism. The more borderline it is, the harder. As the project approaches zero benefit, the difficulty for making it happen goes to infinity. (This is an idealization. In real life, with imperfect information and mistaken judgements, it will approximate this plus random error.) Isn't that good? Why is it a problem that barely-beneficial projects rarely happen, and hugely-beneficial projects happen reliably? That is not a problem. That is great!
Capitalism Can Produce Public Goods
There are many ways capitalism can produce a dam, assuming the benefit exceeds the cost by a reasonable margin. For example, someone can draw up a contract where all the farmers pay an equal share, but they only pay if everyone signs the contract. In some cases, this will result in the dam being built.
Another way to approach the dam project is to sell the name of the dam to a large company, and sell them advertising on the surface of the dam. This increases the benefit of the dam project by finding a second use for the dam besides just controlling floods. By increasing the amount of wealth the dam creates, the project gets a better profit margin, and becomes easier to implement. Now we can allow some free riders without worrying about it.
The dam project will increase the property value of all the farms in the valley. Another way to make a profit is to buy farms in the valley at the current price, and then to build the dam, and then to sell them at the increased price.
The ideal way to control the floods depends on the location of your farm, and what crops you are growing, and when you plant them. The dam won't benefit everyone equally; and depending on the schedule that the floodgates are opened and closed with, we could control who is benefited most. The decision about exactly when to open and close the flood gates, and which crops benefit the most as a result, could be sold for an additional profit.
More ways to produce the dam are possible. These are just examples. A complete list can never be created because capitalist projects involve thought and creativity. With more creative thought, an entrepreneur can come up with new ways to make a dam building project succeed. The underlying principle is that if people want something, and it's worth paying for to them, then there is some way that they can pay for it and get it. What's to stop them, in principle, from being willing to pay for something they want to buy at the available price?
Not All Projects Are Good Ideas
In real life, it's not obvious which projects will succeed and which will fail. Any scenario which assumes a project should be attempted and completed, and assumes it will succeed if attempted, and assumes everyone knows this for sure in advance, does not correspond to a real situation. Assuming that if a projected isn't attempted that must be a failure is a bad assumption.
People make mistakes. The truth isn't obvious. Sometimes dams are built and turn out not to be as useful as the planners imagined, and turn out not to be worth the price. Construction cost estimates are notoriously unreliable. Some dams that weren't worth building would have been worth it if initial estimates to build it were accurate, but then the project went way over budget. These things happen. And if some farmer thinks this project may be like that project, so be it. He's entitled not to risk his money on a project just because I believe it is a good idea. The less risky the project, and the more obviously worthwhile, then the less farmers will dissent in this way. On the other hand, bear in mind that sometimes millions of people agree, and a handful disagree, and the handful turns out to be correct.
Figuring out which projects to undertake is a difficult problem. And it's made harder because there are more projects that would turn a profit than there are people to work on them. We can't pursue all worthwhile projects even if we wanted to. And that's only the projects people have thought of. There are countless more projects, including millions of projects better than the majority of projects currently underway, which no one has thought of doing. We have to make judgment calls about which projects will be the most efficient, and which will provide the benefits we want most.
Some farmers will refuse to join the dam building project because they don't have any money to spare for it. They might believe it will make them a 20% profit, but they have holes in their roof, and barely have enough food, and they'd quite reasonably rather patch up the holes and buy more food than invest money in a long term project. If the Government taxes those people, and takes food out of their mouths to pay for the dam, then it is hurting them. It's not acting in their interest.
According to capitalism, I have no right to make others go hungry so that a dam which will benefit my farm can be built. Interventionists play off such fears as minor, unlikely concerns. But they are mistaken. If a family would voluntary pay for a project, then taxes are clearly unnecessary. The forced taxes only come into play when some families refuse to pay. All the cases where Government interventions of this kind will have any effect at all are cases where it's forcing some people to give up things they consider important for a dam they consider less important. People are being harmed, according to their own judgment, every time. That's why they didn't want to participate.
Pooling Money and Sharing Is Unwise
Suppose we pool our money and build a dam. Now what if we have a disagreement about the dam? Who gets their way? How are decisions made? Will their be committee meetings? If I don't want to join a project that will involve committee meetings, is that necessarily unreasonable? And what if the committee doesn't agree?
Who decides when we tear down the dam and build a new one? Who decides if the dam's effect on flooding, or on endangered salmon, is actually bad, and maybe we should tear the dam down? Who decides if a certain upgrade which has some benefits, but also some downsides, should be made to the dam? And so on. There are unlimited issues about which people could disagree. Sharing property is, in general, a bad idea.
The "Public Goods" Distinction Does Not Hold Up
All goods are partially public, and partially non-public. There is thus no such thing as a public good. There's only goods which are more or less public. In all cases, the non-public part can be sold to individuals and excluded from individuals who do not pay for it. Free riders can only get the public part for free, and even then all the above arguments apply.
Consider the dam. The flooding in the valley goes to everyone. But there is no way for a free rider to gain control of the name of the dam. Now consider the policies for when the dam is opened or closed: free riders can be excluded from meetings to decide that (or the decision could just be sold to someone, and again they are excluded). And what about dam tours? Those are worth money and free riders don't get any of that profit, nor any say in the decision whether to have tours at all. And what about travel over the dam? A toll could be charged, it could be banned, it could be walking only, and so on. The initial decision whether to design the dam to allow for cars, bikes, etc, has non-public value, and the further decisions whether to allow them and whether to charge them have non-public value too.
This isn't just for dams. Restaurants sell non-public goods, such as food. And they give away public goods, such as raising property prices in the area. Houses with restaurants nearby are more valuable, but the property owners are not required to pay the restaurants anything when they open. A wide variety of other goods are commonly given away to the public. If I get my house painted, the neighbors can enjoy the better view, but I don't charge them. If I run a school, and teach people physics, you benefit by the greater availability of people to ask physics questions, but I don't charge you anything. Book stores generally let people come in, read the books, and leave, for free. They could actually stop that if they wanted, but they prefer to give away that good to the public because no harm is done and people like it.
The lesson here is that selling any good always involves giving away some public good, and selling some non-public good. I've given individual examples of this. Here is a universal argument. Any time I sell a product or service to the public, the entire public gains the option to buy it, and they gain this option for free. They can enjoy the option for years and never pay me a dime.
For example, suppose I sell fire extinguishers at my store. A person living next door could have a plan to run and buy one if there is a fire. He could be comforted by this plan for years, while I get nothing. He is a free rider. This may not be the brightest plan, but as far as he's concerned he's getting something for nothing.
Suppose I sell ice cream. Suppose you like ice cream, sometimes. You thus want ice cream at those times, but you don't want to keep any around at other times, which costs money and freezer space. Then what you need is the option to buy it. If there were no shops selling ice cream nearby, you'd need to buy some and keep it in your freezer to provide that option. If there are shops, you don't have to keep any in your freezer; you materially benefit from the existence of the shops without having to pay them.
Stores, and businesses in general, give away public goods but find one or more goods to charge for. What they focus on is charging for those goods, and they don't worry about anything else. They don't care how much free benefit they give the world as long as their way of making money is effective. And that's exactly what dam builders ought to do, too. Choose some aspects of the dam to make money on, find people willing to pay, and don't worry about any extra benefit which is created and given away for free. If you have a good idea to monetize it, then go ahead, but if you don't, then it doesn't matter as long as you are making money.
The distinction between public and non-public goods doesn't hold up. Goods are always mixed; the way all businesses work is to focus on what they can sell effectively, and not worry about how much they give away. This is exactly the same for the standard examples of public goods and for the standard examples of non-public goods.
I've detailed ways the public goods argument is false and confused. Now I want to talk about the overall mindset.
What people have done is find a problem, or a lack of a guarantee of perfection, and demand it be solved. They see that entrepreneurs are fallible. Capitalists make mistakes. Capitalism offers no guarantees. So they look for something which claims more than that. They turn to the Government (or sometimes other things). And they say, "If the Government stepped in every time capitalism would make a mistake, and fixed it, then things would be perfect." But they don't realize Governments make mistakes, and no one knows in advance which things the market does will and won't be mistakes. Their problem is they aren't fallibilists.
This is a variation of the "Who should rule?" mistake in politics. They start with some idea they deem true and think about how to make sure it is implemented. What should be done instead is to start from the idea that we don't know what's best, and then try to figure it out, and try to set up systems which are good at figuring it out, and good at correcting mistakes and learning from mistakes.
That's what capitalism is all about. Instead of trying to guarantee the right thing happens, it tries to put incentives in good places, let people make judgments about which projects are worth pursuing, and it has resources move from people who fail to people who are successful.
Many people in favor of capitalism acknowledge public goods as a problem. But if they understood what capitalism was really about, and were full fledged fallibilists, then they would see there is no problem at all. Capitalism has nothing to apologize for, and no flaw, in this area.