Every machine needs a power source, and for many of them that means an engine. Your car has an engine, whether diesel or petrol. Yes, electric motors have advantages, but the disadvantages of batteries have them taking second place to engines in almost every application.
The biggest advantage of an engine is that it can convert fuel directly into energy, unlike a motor which needs its energy served up in usable form. Just fill up the tank.