It is literally a problem of not having good enough alternatives. Fossil fuels have an energy density of 30-40MJ/kg. Also they provide power on demand. Ignoring climate effects, they are pretty close to ideal. Lithium ion batteries have less than 10% the density. Teslas only work by making up for the horrible inefficiency of passenger cars, and by devoting significantly more of the car's mass to energy storage. So far I haven't heard much at all about battery powered freight transportation.