This is what the government is. It's a large non-profit, in fact the largest player in the economy, that's always zipped to produce no profits. There isn't even any structure to distribute the profits (there are no "shares" of the government or anything of this sort).
The whole point of profits and investing is to hook up the "skin in the game" of investors to viability of project. That's the definition of capitalism.