Because it is a huge investment, that also has maintainance costs.
This train on the other hand seems superior in every way for this specific use case (getting ore from high altitude to low altidude and empty trains back up)
Electrified rail is not magic, you still need an engine on at least 1 car. You still need some way of converting electrical current to a force to push you down the tracks.
Because prior to them, Russia was a backwater with anemic infrastructure, and they started massive greenfield infrastructure projects at a time that the technology was mature.
A quick google says they hauled about 60% of their cargo with electric locomotives, 70% of passenger traffic. Currently about 51.5% of modern-day Russia's 105.000 km rail network is electrified. Compare with others on this chart (which seems to omit Russia for some reason): https://www.itf-oecd.org/transport-connectivity-trends-compa.... TL;DR, they did not, in fact, electrify all rail.
As for your swimming in money comment, I'm not sure what you mean; the Soviet Union was an industrial powerhouse and the second largest economy in the world between WW2 and the mid-80's, its economic decline only started after that with economic liberalisation under Gorbachev, followed by both oil price collapse and the costliest disaster in human history (until then), the Chernobyl incident, both in '86. Japan overtook it as the 2nd largest economy only by 1990.
The economic liberalisation was a response to the decline. They didn't stray away from more 'proper' communism because everything was hunky dory, you know.
Statistics about the Soviet economy are notoriously hard to make sense of. First, they ran a rather weird economic system (compared to the west), and second, you can't necessarily trust the statistics, there weren't really any independent organisations at all like we have in democracies. No independent media to check, no independent statistical institutes etc.
Even in the west environmentalism was only just getting en vogue in the second half of the 20th century. But the Soviet Union takes the cake in terms of how much environmental damage they were willing to take for a bit of extra economic output.
Also, if your mine is done, you can load up your trains and bring them to the next up to the mountain mine! Lifetime of the catenaries might be a lot longer than the mine.
This train on the other hand seems superior in every way for this specific use case (getting ore from high altitude to low altidude and empty trains back up)