>>1112826German DB's long distance division (ICE/IC trains) also makes an operating profit. Though that only works because every city maintains and pays for urban transit, same for the states which subsidise regional trains, both of which serve as feeders for the then-profitable long distance trains.
I'm sure the Shinkansen network can run on an operating profit, urban trains in Japan-tier population densities probably as well. But can rural trains like e.g. JR East's line to that Aizu webcam (RIP) really survive without subsidies?