Don't German citizens pay for this information through taxes? Is this different from forbidding citizens from using the police instead of private security companies because they're providing security services "for free"?
Edit: The data is also freely available for private use on their website, just not as nice and compact.
I think the main reason for the lawsuit was that the DWD app is really, really good – in my opinion it's the best weather app we have in Germany. This made it very difficult to compete with – it was free, ad-free and good.
This kind of bullshit will only get worse, with investor-state dispute settlement agreements int trade deals forbidding governments to take on new responsibilities whenever there is a private company in that space.