Hah. Sort of. But the big difference is the railroad doesn't let anyone else use it. A regular road can support cars, trucks, truck convoys and maybe even bikes or pedestrians. A railroad can support trains.
Do they, pragmatically speaking? High-volume cargo traffic quickly wears down the asphalt and causes regular jams, a bike lane unseparated from cars is a safety hazard enough large enough to push many potential riders off the road, and most morning commutes would be better served by well-developed public transit.
One EMD SD70ACe locomotive moves over 10,000 tonnes of cargo using 1,300 L of diesel per 1,000 km. The equivalent 286 trucks would consume 107,250 L, while needing 55.8 km of a single-lane highway, compared to the 2.16 km freight train.
Similarly, the average US car has 1.5 passengers per ~30 m² of space, so 20 m² per person. An average bike is about 2 m² per person. A typical trolley car holds ~160 passengers per 200 square meters, so 1.25 m² per person. A tram reliably moves at 60–80 km/h on interurban routers, or 30 km/h in urban centers with frequent stops, a considerable improvement over San Francisco's 16 km/h by car for last mile.
the problem with rail is that it's hard to scale up (and down)
getting new tracks built takes waaay too long (because of NIMBY and simply because the road is usually already there)
there's no long-term thinking from politics, and no market forces converging to somehow over the years lead to some compounding (so the inefficiencies don't really translate to some big problem -- well, climate change and slower GDP growth)