I guess the "unrelated to work" might be a point of debate once you create IP of high value.
In fact, in Germany we have the "Arbeitnehmererfindungsgesetz (ARBNERFG)" [1] which stipulates that your employer has first right to all patents and inventions related to your work, even if you create them in your spare time. The basic reasoning is that your employer supplies you with all tools and ressources required for the invention in question. It would be way too easy to just clock out, return to your desk and a minute later write down the world formula and sell it for billions. You're entitled to a compensation though.
The law looks a little stupid when applied to computer science but makes much more sense in a research or engineering context.
It's also ridiculously outdated. It's from 1957 and based on an outdated, traditional understanding of "big" industrial/engineering companies and their employees ("the little guys"). Also, it protects the companies' interests to the detriment of the employees' interests, which is understandable given that it is based on a war-time law (WWII) which was supposed to support German war engineering.
I'm not so sure that it's ridiculously outdated. Sure, it could use a brush-up but it acknowledges the basic fact that your employer often spends time educating you and allows access to ressources in your line of work that form the basis of your inventions - hence the requirement that the invention be related to your work. Fact is that inventions are rarely a stroke of genius that happens instantly in vacuum. They're often refinements and improvements of readily known things. Quite often they're obvious and simple in hindsight.
It's a hard balance to strike, but just giving the option of moving all "inventions" to after-hours so that the employee gets all benefits won't cut it either, especially with modern work-time models such as flex-time or home office. I don't have a perfect solution, but giving the employer first-buy rights seems like a reasonable starting point for a compromise. The law stipulates a reasonable and fair compensation for the work provided.
I love it how German seems to be able to put the whole law in one word :) It doesn't sound that stupid, depending on what "related" means - if it is indeed almost the same as you are being paid for, then it may make some sense (I'm not sure I agree with it, as it's basically means employer owns your thoughts, which seems a weird concept to me, but even if it is wrong it's not completely stupid). If it's just "it's all computer stuff so must be the same" then it's stupid. I'd say it all depends on how the courts will be treating it.
Overly broad applications are rare in germany. If you look at an engineering or research context it's easier to nail down: If you're a researcher the employer pays you for your thought and provides the lab, access to related research, to peers to discuss stuff with etc. Now you've been working on a particularly hard problem and the stroke of genius strikes you at midnight, you get up, work straight for two days and write down the formula you've been working on for years. It's worth a billion dollars. Technically it's during off-hours, so is it yours?
In fact, in Germany we have the "Arbeitnehmererfindungsgesetz (ARBNERFG)" [1] which stipulates that your employer has first right to all patents and inventions related to your work, even if you create them in your spare time. The basic reasoning is that your employer supplies you with all tools and ressources required for the invention in question. It would be way too easy to just clock out, return to your desk and a minute later write down the world formula and sell it for billions. You're entitled to a compensation though.
The law looks a little stupid when applied to computer science but makes much more sense in a research or engineering context.
[1] I just adore german legal terms.