The U.S had the greatest rail network and then we built the Interstate Highway system and abandoned rail.
Truth is that nobody funds multiple competing transportation network. Japan chose rail, we chose highways.
Rail is hardly abandoned in the US, the US has a top tier _freight_ rail network. It's just passenger rail that sucks big balls in the US.
Rail companies were rather abusive - because they could get away with it. Also, shipping freight was much more profitable/easier/simpler than shipping people. When the interstate system was being built, folks would much rather drive than ride a train (or bus for that matter).
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.
The US did not abandon rail, it just used it for freight
Europe shifts people by train, not freight.
The US/Canada/Mexico is about 10% more than the EU, but it shifts 7 times as much freight by rail.
japan is a small island the US is one of the most extensive and biggest distance from population centers country on earth
I tihnk that helps explain the feasiability of train on each country more than inherent choices
Although Japan also has extensive highways, and they're privatized in a similar way to JR (NEXCO East, West, Central) and are nearly all tolled - if you're driving alone, it's often the same price in tolls alone as a ticket on the Shinkansen (but the equation quickly flips when you more people in the car)