And from the 6 companies the public railroad was split into, not all are successful: "JR Hokkaido expects to incur a record pretax loss of ¥23.5 billion in the year that ended in March [2017], with the company’s president likening its loss-making business structure — due to loss of passengers caused by falling local populations and the expansion of expressway networks — to “a bucket with holes in the bottom."
https://www.japantimes.co.jp/opinion/2017/04/04/editorials/p...
It's the same with postal services, broadband access and similar infrastructure.
Of course a society as a whole can decide to stop subsidizing these low density areas, but that discussion is largely orthogonal to the privatization topic.
On top of that, railroads (the actual rails and public transport lines) also tend to be a somewhat natural monopoly, so even the high profit lines veer towards minimal service and maximal price.