Hydrogen has a better gravimetric scaling than batteries - as stored energy increases, the fixed weight of the fuel cell is amortised over more energy and the weight of high pressure tanks goes up with their surface area while the energy stores goes up with volume.
So for applications where you want to store a lot of energy and are weight but not volume limited, hydrogen might make enough sense to pay the efficiency penalty required to turn electricity into hydrogen and back again.
That's why it makes more sense for big trucks than it does for passenger cars where volume limitations matter a lot more and where total energy is less.