Hydrogen is a backup plan, and a sensible one at that. Germany doesn't have much in terms of lithium and other precursors for batteries, besides we have an awful lot of old rural non electrified train routes where the cheapest option by far is to go to hydrogen.