The physical and public safety requirements on railroad tracks demands different parameters. Also, there was significant community and government buy-in for lack of alternative. Cost-of-living adjusted, those tracks you mention would cost astronomical sums by todays standards.
Similarly with electricity - long time ago it was possible to electrify remote communities but now pulling fiber there is such a problem that we view satellites as better alternative?