It’s to do with efficiency. Internal combustion engines in cars are less than 40% efficient at extracting energy from petrol/gas. For every 100 joules in the fuel, most engines lose more than 60% in heat, noise, and vibration via the engine itself and the drive train (gearbox etc).
Coal plants are simply more efficient than that. Renewable energy is better still.
Latest Answers