Regardless of the specific case here, businesses do a horrible job of accounting for the externalities of their decisions. This shows up in two ways:
1. Negative externalities - there is a large cost to society of my company doing this, but I'm not the one paying the cost. As a result I can still make money off of it so I will do it. Even though it is a net negative for society. Dumping toxic pollution into a river is a great example. You need an external force (government) to step in to ensure they account for that. Either through things like laws to make it illegal (and actual enforcement of those laws).
2. Positive externalities - there are larger benefits to society of performing the action, but the company itself doesn't get that value as a result they don't do the action. Subsidizing things like the US interstate project is a great example of this. Again markets fail to capture this so don't do it. Or if they do it's in a way that's a net negative for society and becomes a defacto tax on all economic activity making other useful businesses unprofitable. Again an example would be if all interstates were privatized and drivers were charged maximal rates. It would drastically reduce economic activity.
There are absolutely situations where markets are not the right solution to the situation and government intervention is, and they usually fall in where there are significant negative or positive externalities.