Except that you are leaving out pieces of the equation. Energy conversions tend to be far more efficient at scale. Having millions of little engines burning fuel will never be as efficient as several *much* larger systems.But even a basic understanding of science would allow one to acknowledge that burning fossil fuels to generate electricity, distributing it over a very lossy grid, charging a battery and then using that to move a much heavier vehicle is less efficient that burning the fuel directly in a lighter vehicle.
It takes quite a bit of electric energy to refine and transport liquid fuels. One could make the same argument you did in this regard... why waste that electricity on creating and moving liquid fuels around when you could simply put it straight into the vehicle?
Also... what percentage of electricity is sourced from the burning of gasoline or diesel fuel anyway? There is hardly a comparison to be made there.
Stating this in a comments section does not make it true.Though perhaps I should have been more precise and said that every single EV charged with grid electricity creates more CO2 than any ICE vehicle.