electrification is goddamned costly, both in the initial construction phase and the eventual operating+maintenance phase. Its only beneficial when there is huge amounts of traffic on railway lines (like many of the primary routes of IR).
Since people don't use railways much in these countries, its cheaper to have diesel lines than electric ones.