Electricity is also much easier to transport over long distances, using high voltage DC lines, than it is to transport oil or gas via pipeline or truck.
And oil is much easier to transport over really long distances on tanker ships.
Only if you neglect the huge externalities of tanker ships, with the extremely dirty fuels they burn and the occasional catastrophic spills.
If you can have batteries with higher energy density than oil, why not fill up a ship with batteries?
Because A/C lines are more efficient than either oil or batteries.
Not over ocean distances though?
and can then be burned to make electricity
Batteries will also burn under the right conditions!