1) Less pollution. Not only the air, but the land beside the tracks, was fouled by coal smoke and dust. One steam locomotive in a valley is picturesque; ten are filthy dirty.
2) More power. There is almost no limit to how many electric motors you can combine while the Mallets were about the limit on steam power.
3) Cost. It took an enormous workforce to operate and maintain the steam locomotives. Diesels are easier to maintain.
4) Control. Steam locomotives had to be more carefully matched vis-a-viz power and speed, and were harder (actually impossible) to control from a single cab in a large consist.
There was a brief period when some railroads experimented with combination of traditional steam generating electricity for drive motors, but that didn't prove economical.
__________________
"Well, I've wrestled with reality for 35 years, Doctor, and I'm happy to state I finally won out over it." Elwood P. Dowd
"Almost" Good Answers: