Mirai is a beachhead for applications that can’t tolerate charge times. Hydrogen can be transported and stored and is considered a viable alternative for industrial applications on an island nation that is currently dependent on the Middle East for oil. So of course the Japanese government created incentives for adoption and innovation. Also, until Tesla, Americans generally showed zero interest in non-hybrid electric vehicles. For all we know, fuel cells could have a brighter future than it appears they do right now.
(of course it could be that when they started down that path, it was not clear that battery electric vehicles were practical either)