Electrolysis is very inefficient and other production methods are hydrocarbon-based which means you're just playing games with where the carbon is being released.
Hydrogen molecules are so small, it leaks out of everything, and leaks through a lot of things.
Conventional alkaline electrolysis is about 70% efficient and PEM electrolysis about 80% efficient. That's pretty good. The round trip to electricity is of course worse, but hydrogen itself has many industrial uses.