Mostly because I don't believe Germany would plan so heavily around Russian gas if it knew the war was inevitable.
Yes I understand what you’re saying, but it needs to be reminded that the post-2009 German economic recovery was highly dependent on cheap Russian gas import. There is simply no alternative, Germany struck gold with Russia selling them cheap gas with euro as the currency of transaction. It was cheap energy that allowed Germany to preserve its high labor wages. That, or expensive energy with depressed wages (like many Asian countries do). No other way around that.
What I think actually happened though (and there are many circumstantial evidence to suggest this), was that Germany was absolutely convinced that the combined sanctions of the world’s largest economies (US + EU) would absolutely demolish Russia’s economy within months, if not weeks, which they often deride as one that is smaller than Italy’s GDP. In their chauvinistic mind, there is no way that a weak economy like Russia’s could ever survive such powerful sanction forces of theirs. With the collapse of the Russian economy, they’d be able to actually carve up Russia’s resources for themselves. In other words, they got greedy.
The EU responses after the war started support this hypothesis. Instead of advocating for ceasefire, the EU continued to pile up more and more sanctions against Russia, somehow hoping that just one more sanction would actually bring Russia to its knee. And they kept waiting and waiting and didn’t see what they expected to happen.
It also wasn’t helped by the fact that Western propaganda churned out in support of Ukraine had distorted their frame of reference, often painting a picture of Russia on the brink of collapse, and it would not surprise anyone that their politicians and bureaucrats actually bought into that. Then, you also have someone like George Soros making headlines saying “Russia would not be able to stop exporting their gas because otherwise their wells will freeze, so Europe just need to hold out a little longer and wait for the Russians to come begging again.” Many European industrialists didn’t even see the perils of their own sanctions until it was too late.