This cost them about $1 trillion.
The truth is, you cannot build systems like this exclusively on the logic of profit. You cannot expect to break even in 20 or 30 years. Projects of this scale are built because the government decides they must exist to serve the people.
And this is a problem with systems that are strictly, or overwhelmingly, capitalist. If you leave every problem in your society to the spontaneity of the market, some challenges are so large and so unprofitable that you will never have sufficient incentive to solve them.