That's not necessarily true. Companies certainly like to advocate for the idea that they automatically own any work you do that's relevant to any of their business interests, even if that work isn't relevant to your particular job. But that doesn't mean it'll hold up in court. Just a couple of days ago I was reading something about how courts regularly side with employees instead of employers in disputes like this, how they tend to interpret that as only applying to work relevant to the employee's job and not to other parts of the company. Unfortunately I don't remember where I was reading that, so I can't go find it again.
Of course, take this with a massive grain of salt. I'd certainly prefer not to have to go to court to try and figure out if this is actually true.
Were you reading it here: https://news.ycombinator.com/item?id=13142327 ? There's a couple of mentions of courts siding with employees and courts in California siding with employees.
All previous companies I worked for had this clause. I've heard it's not as easy as typed to actually enforce. However, the companies I worked for stated that any personal project "relevant" to company interests belonged to them, up to 6 months after you leave.
"For example, the California Labor Code stipulates that regardless of what an employment contract or PIIA says, an employee owns the copyright and patent rights to his inventions if the invention is made entirely on the employee’s own time, without using any of the company’s equipment or technology, as long as the invention (a) does not relate to the company’s business, or (b) did not result from work performed by the employee “as an employee” of the company. Washington state has a similar law protecting employee projects outside the 9-5 bounds."
Of course, take this with a massive grain of salt. I'd certainly prefer not to have to go to court to try and figure out if this is actually true.