The charge times are a factor, but mostly it's cost, cost, cost!
Batteries are economically unsustainable: Li-ion batteries (the type with high energy density that you need in any battery vehicle) cost about 500 $/kWh. You can expect it to drop somewhat through the next decades, say to 300 in 2050, but they are already being mass-produced and unless a significant, revolutionary breakthrough happens, this technology has already delivered what it can.
Hydrogen storage, instead, costs about 12 $/kWh, much cheaper (I'm talking of the only commercial technology, compressed hydrogen at 350 or 700 bar). In addition to that, you need the fuel cells to convert hydrogen to power, and they cost about 300 $/kW (not kWh, kW). However, they are not mass-produced, in which case projections indicate they would cost about 50 $/kW or lower.
Now, trust me on this one (or do the calculations yourself): of the world's 10 most sold cars, almost all have one kW in the engine for every kWh of fuel in the tank (netting for engine efficiency). So mass-produced hydrogen cars can have a powertrain that is an order of magnitude cheaper than batteries by the kWh when mass-produced. Not only you can build a car that drives 500 km—you can afford it too!
But what about efficiency, I hear someone in the back shouting: it is true that batteries are about 90% efficient, and the electrolysis, compression and fuel cells train is about 40% efficient. However, consider this: a battery can operate for about 1500 cycles before end-of-life. Every kWh of capacity will store and release 1500 kWh, which in consumer prices (different by country, I know) is about 150 $. This means that the cost of batteries is much higher than the cost of the energy they will store through their entire lifetime. Efficiency in operation actually takes a back seat when investment costs are this high.
Finally, what about capacity? Li-ion batteries store 0.25 kWh/kg (that's why Teslas are so heavy). Hydrogen (including the pressurised tanks, that are 90% of the weight, and netting for 50% efficiency) provides 2 kWh/kg, again one order of magnitude higher.
To be clear: there is a marked for batteries and one for hydrogen. Smaller applications for short usage are better with batteries (think commuter cars). Larger applications, or applications that in general need a lot of energy compared to power (taxis, buses, trucks, even ships) are better served with hydrogen.