The difference is that the electrolysis can be done at producer convenience. Sometimes wholesale electricity prices (midday due to high solar penetration) are negative or ultra cheap. Transporting H2, even by truck, can be cheaper than the US typical 8c/kwh electric transmission charge. For many areas, enough solar in winter has 3x more summer production and essentially unusable. A balance of solar and H2 produced in summer, can provide the cheapest necessary energy for winter. An alternative is summer exports with winter imports.
Batteries alone are also subject to curtailment, or not enough charging in winter. H2 can be stored at $1/kwh, where a pipeline is free transmission of withdrawals different from deposit locations. The energy efficiency round trip is less important than the $ efficiency of energy delivery.