https://www.palmbeachpost.com/story/news/2024/03/08/brightli...
The rail infrastructure is publicly owned. But the rail infrastructure is open access that private companies can pay for. As far as I understand you can even have a public carrier but it must bid for access like its private counterparts do.
This has already led to an explosion of high quality high speed rail service in countries like Italy and Spain.
To rephrase, some things are not directly profitable but tend to have outsized profitable effects. E.g., the education budget doesn't directly generate profits, but educated people go on to get good jobs and pay a lot of taxes, refunding the cost of their education by many multiples.
The same goes for roads, highways, and rail. Not directly profitable, but they enable a lot of free movement that boosts the economy and, in turn, taxes.