It is merely one of the factors. Batteries don’t charge themselves, and the power grids in most countries aren’t exactly ‘green’. So energy efficiency is also important for EVs, not just because of range/costs but also for the environmental/climatic impact.