Even a diesel generator charging an EV is less pollutant than an ICE car.
It is basically the concept of a hybrid.
Combustion engines need to rotate at a specific rpm to be efficient. That is why ICE cars have gearboxes, because otherwise they would be even less energy efficient.