A Toyota Corolla with a 1.8L engine requires 6.2 liters of gas to drive for 100 kilometers on a highway. But on city roads, it would require 7.9 liters of gas. A 2022 Ford F-150 requires 9.4 and 12.1 liters per 100 km for highway and city driving, respectively.
It’s not just because of gearing. It’s because an internal combustion engine generally gets more efficient when it runs with a high torque.
An ICE car still requires more energy to go faster, but going faster allows you to use a higher gear without stalling the engine, which increases the torque and makes the engine more efficient. Combustion engines aren’t very efficient to begin with because the thermodynamic processes they rely on just aren’t very efficient, reaching generally only a bit above 20% in realistic scenarios, so any decent chance in the engine’s efficiency generally overcompensates for the additional energy the car required to travel at higher speed. Though eventually drag does take the upper hand and with speeds above 100km/h the fuel efficiency of an ICE car usually starts to decrease again.
Electric motors have a much flatter efficiency curve (especially with modern, advanced driving circuitry), so the extra drag at higher speed just directly translates to higher battery consumption.
The relatively flat efficiency curve of electric motors is also part of the reason why most electric cars don’t have any gears, combined with the very high RPM limit of electric motors. There simply isn’t a need for them.