Lets say that the government and DWD developed equivalent apps but DWD did it at half the cost. If the government app has to charge users based on its costs, then it will be twice as expensive, and lose out to the more efficient private company. But if they are just allowed to give it out to consumers for free (which a private company can't do) then it will dominate the market even though it is not the best use of resources. I assume that is the rationale for this law.
Maybe they can similarly spin off the weather app into a company with some kind of status that retains some of its original purpose (which I guess is supplying weather information to German nationals).