Your statement about trains is not correct. US rail is optimized for transporting goods rather than people and overall does a good job. It is also quite profitable. For example, the Union Pacific 10-K shows a healthy profit for FY 2018. [0]
One recent stat I found claimed that in the US 43% of freight travels by rail whereas in the EU it's only 10%. [1] European highways are consequently choked with trucks, something you notice pretty quickly if you drive in countries like Germany. It's easy to overlook, though, when traveling in one of their nice passenger trains. :)
Congratulations, you've slayed a strawman. It's pretty clear both the OP and myself were talking about passenger trains, which in the US can't be operated at a profit.
It's apples to oranges. The US rail network is optimized to solve another problem. The evidence I've seen indicates that US freight transport by rail is among the most efficient in the world. It's hard to adduce it as an example of technical failure.
Even on your terms of debate I think you need to cite evidence of overall profitability of passenger trains in other countries. Deutsche Bahn (DB) makes some money but depends on substantial subsidies from the German government. [0] Wikipedia shows that most passenger rail seems to be heavily subsidized, though interestingly not Japan. [1]