Japanese investment in hydrogen goes back to the 90s, before battery EVs (aside from the GM one) had proved practical. It was insurance against losing their auto industry if things moved away from gasoline ICEs. It has kind of had its own momentum since then.
Japan land isn't great for balanced natural energy buildings, so they want to continue import energy after carbon neutral, and hoard solar generated electricity. Nuclear is (was?) unpopular for obvious reason for a decade.