Ya, the electricity is coming from coal plants or nuclear, neither of which is objectively better than petroleum alternatives.
Until electric powered vehicles get their energy entirely by solar panels on their roofs, or similar clean generating methods at discrete plants, they're really not so much better except locally. But while air might be cleaner where they're driven, somewhere some place is uffering because of a local coal plant, or from radiation from fission-based nuclear plants.
If you measure the pollution from a coal powered electrical plant, and divide it by the number of EVs it can charge, I bet it will come out a great deal better than the emissions from that many gasoline engines.
For example, TVA's Kingston Fossil Plant generates 10 billion kilowatt hrs per year. That equals out to around 27.4 million kWh per day.
A Tesla's charge is 85 kWh. So the plant can charge around 320,000 Teslas in a single day.
Do you suppose the plant puts out more pollution in a single day than 320,000 gas powered cars?