>>2084851Depends on lots of things. If you have frequent trains and lots of passengers, with also frequent stops in regional and suburban trains then electric is clearly better.
Also the more part of a rail network is electrified the more sense it makes to electrify more of it.
On the other hand, if you have mainly big freight trains that aren't all that frequent and long stretches through the middle of nowhere, then electrification probably isn't of too much value.
The MILW had some sections electrified in the steam era because of steep grades and affordable hydropower. But with diesel locos that was really not very practical. They had to change locomotives and diesel locos could handle grades easily unlike steam.
If it had been 100% electrified they'd probably have kept it because then you have economy of scale (mainly no changing locos). But as it was it was pointless.
Btw isolated electrified sections in the mountains wasn't that uncommon in the steam era. There was something like that in Spain in Mexico, probably other places as well. But in the diesel era it's either all or nothing.