Governments offer incentives for green tech. The oil industry likes green tech which still uses oil and gas. Hydrogen fills both niches.
Hydrogen is perfect, because it can theoretically be made fully green, but practically it never will be due to the terrible economics of electrolysis. But the fact it theoretically could be means it can qualify for all those tax breaks and grants.
Some tax breaks are contingent on investing in 'green' stuff - so for the oil industry it makes perfect sense to invest in the only green tech which will never not use oil and gas.