Rail is great when you have a lot of people or things moving on the same path.
Highways are great when everyone has a different path.
Japan has most (but not all) of its large destinations on the pacific coast, which works great for rail.
I'm sure passenger rail networks used to have more routing options than amtrak does now, but it's hard to get between a lot of places by rail without going through Chicago. In the western US, you can go north/south in the pacific states or near the missisipi. Sure mountains are hard to cross, but there's no north/south in the plains either... Or Atlanta to Florida, etc.
Air is exactly the same but there are connections to everywhere from Kansas or Montana or wherever. I really think the rail situation in the US is primarily lack of investment. And it sucks; even here in Chicago where the connections are plentiful, the schedules and frequency are awful.
Air travel is easier to make work because most of the infrastructure is at the airports, not on the routes. Airlines can change routes easier than railroads. The speed of air travel has natural utility. Commercial airplanes come in many sizes... Turboprops can reasonably service small airports that can't fill a 737. Once daily or even a few times a week service from a middle of nowhere airport to a hub opens you up to a lot of destinations with 1 stop, and a 2nd stop (maybe with a different airline) probaly gets you to anywhere you want to go.
With small airports, there's probably plenty of flight time is worse than drive time and security and rental counter time add up too, so flying isn't always less time than any other mode, but often it is.