In actuality and outside of those artificial limitations, rail is one of the most efficient forms of transport we have, especially electric rail.
No, they use diesel motors for almost a century because they are more efficient and cost effective.
As for the rest, that is due to historical reason, back when those networks were established, we didn't have the electrical grid and power available. We do now.
The main reason they still use diesel is because it's cheaper to keep the existing gear running, rather than replacing everything. Electric trains are so much more efficient (in modern kV systems), it's not even funny.