Hydrogen is an attempt to salvage that investment.
Electricity is a more universal form of energy that can be easily generated, shipped and utilized more economically than hydrogen.
The only advantage hydrogen has at the moment is that it can be stored in a more energy dense manner than electricity.
Billions of dollars are being spent on research in a global effort to change this. Japan is about the only country willing to bet against this effort.