It makes sense for big monopolies like Bell, or the CCP. The investment can be justified if the ones investing are confident they will be able to capture the value and not some competitor.
Bell Labs also served to maintain positive perceptions of the monopoly. Unix was famously developed despite the knowledge that AT&T would not be able to offer it as an independent product.
I don't see how it follows. Anyway it's debatable if the current system with antitrust laws is true capitalism. One of those poorly-defined words that people argue over.