In 1890s, internal combustion engine was a fresh technology and it was a great opportunity to replace inefficient horses which have limited top speed of seventy km/h. There were some electric engine cars and plans to run diesel engine with peanut oil but they were all died by petrol. End of 19th century was the rise of the petrol, people find out that petrol is something very vulnerable and can be used in cars. It can be considered as petrol is invented a bit earlier than petrol engine! And this made it very easy to fill the cars' tank. Engineers did not invent an engine which is using something that does not exist!

With electric cars, situation is a bit complicated. We can charge our e-car by plugging into our wall at home but it takes very long time to charge and electricity is not something cheap and you still emit emissions while charging it. One other fact; if we all drive electric cars and charge them at night, we could end up burning the whole electricity network which is not designed to charge whole countries' cars! So, there should be a huge investment to upgrade electricity network for charging our cars.
In the two alternative cases, invented technology is moving faster than the fuelling technology. I cannot say the exact for hydrogen cars but I could see one thing clear, we will drive petrol engine for quite some time.
Picture is from;
Honda Website