Even if all the electricity for EVs came from a centralized coal plant (it doesn't) it would be better than using combustion in individual vehicles. Centralized pollution in one area is better than attempting to mitigate diffuse pollution everywhere.