Years ago, when there was still significant passenger rail service, the now-defunct Interstate Commerce Commission established uniform accounting rules for the railroads. Certain costs were incorrectly allocated to passenger service. On paper, the railroads couldn't make money on passenger service, so they slowly abandoned it. However, with the demise of passenger service, the costs didn't go away, since they weren't related to passenger service in the first place. As a result, the railroads are still losing money because of incorrect allocation of costs.
Ironically, the ICC was originally established at the behest of the railroads, who wanted to form a cartel but couldn't do so because they had no way of enforcing their "agreed" prices. Individual railroads would agree on specific tariffs for specific goods, but then "cheat" by offering "rebates" to big customers. Finally the railroads got the ICC to enforce their cartel. What they didn't realize was that the ICC, a political body, would pay more attention to the larger number of railroad users than it would to the railroads themselves. The railroads got their cartel, but the ICC set rates at money-losing levels.
One more illustration that you should be careful what you wish for. You might get it.
Norfolk Southern seems to be making money.
We are told that it's impossible for railroads to make a profit on passenger service; this might be true for all I know, but it's never been put to a fair test. Of course Amtrak loses money hand over fist; that's what usually happens when the government runs a business.