Hydrogen is 100% an attempt by fossil fuel companies to remain relevant in a "green energy" world. The primary source for hydrogen would be from methane in natural gas, and they could then sell this as a "zero pollution fuel" while continuing their non-renewable energy business as normal. If you read between the lines and look at the companies involved, they're always linked to fossil fuel companies directly or indir…
Now, hydrogen in cars isn't just about how the "fuel" is produced. People try to reduce it to CO2 emission number, but to me there's a lot more nuance. Petrol fuel burned by thousands of vehicles in the middle of a city isn't the same as petrol fuel burned in an hydrogen plant. The CO2 numbers might be similar, but the effect on people's life is completely different. EVs achieve the same goal, but if all vehicles can't be EVs (I think it's reasonable to expect cases where EV won't work), the rest being hydrogen or other low pollution alternatives is I think important.
Car makers themselves aren't touting hydrogen as the end all be all either, most makers in the game are using it as diversification to not put all their eggs in the EV basket.