There were quite a number of similar electrification schemes in more mountainous areas of the States before WW2. I believe the reasons were some combination of the better performance of electric traction; the reduction of dangerous levels of pollution in tunnels; and the availability of hydroelectric power.
Apparently a key factor in the case of the Milwaukee Road was that during the winter it would get so cold that it was difficult to get good steam production from the locomotive as they would loose huge amounts of heat to the environment.
Additionally if a locomotive had to dump a fire for whatever reason or it went out overnight it was almost impossible to relight it.
These are not problems experienced with electric locomotives.
Where the sections concerned are still open to traffic they have all been de-electrified, having essentially been made redundant by dieselisation. The diesel could run for thousands of miles with helpers added on mountainous sections if needed. It produced far less pollution so could operate safely in most tunnels, sometimes with extra ventilation. And the lower costs of the diesel and the removal of the overhead line outweighed any performance advantage of the electric, especially as time-critical passenger traffic was becoming less important.
The Milwaukee Road indeed had two sections of overhead line, with a gap between them - the system was life expired however General Electric had offered to underwrite new locomotives and overhead line equipment, even electrification of the central section so there would be one long continuous electric run.
However the railway's board had concluded that their Transcontinental operatino was an anchor that was dragging the railway under and shut the entire thing down, turning themselves back into a regional short line operator.
Tragically it later transpired, when it was too late to do anything, that the expenses of the electric sections, and of the Transcontinental operation more generally, had been double entered. Far from being an anchor it had been the only thing keeping the company afloat.
But by then the scrappies had taken away all the copper - which coincided with a crash in the copper price so they didn't even get the money they had hoped from the decommissioning.