California’s Labor Code, Section 2870 reads:
a) Any provision in an employment agreement which provides
that an employee shall assign, or offer to assign, any of his or her
rights in an invention to his or her employer shall not apply to an
invention that the employee developed entirely on his or her own time
without using the employer’s equipment, supplies, facilities, or
trade secret information except for those inventions that either:
Relate at the time of conception or reduction to practice of the invention to the employer’s business, or actual or demonstrably anticipated research or development of the employer; or
Result from any work performed by the employee for the employer.
b) To the extent a provision in an employment agreement purports
to require an employee to assign an invention otherwise excluded from
being required to be assigned under subdivision (a), the provision
is against the public policy of this state and is unenforceable.
I found out the hard way about IP assignments after I accepted a software engineer position in my earlier days, around ~2005. The centimeter-thick document arrived by certified mail. I was raging mad, called the HR director that hired me and asked why this was not mentioned earlier. She said "everybody signs them" and "it's fine".
To me, this was Not...Fine. They knew full well during my interview that I had side projects, including real software sales, real customers, and an LLC.
I immediately consulted a lawyer, who gave me multiple options/ideas other than just signing the document outright.
The HR Director, my future supervisor, and the Division Vice President I was to work under all met (this was a $700 million USD revenue per year company at the time, with 1400 employees, so not exactly small). The VP was visibly irritated and said things like "why do you even want to work for us anyway?". Things became heated quickly, and I remember inhaling one last time, grasping my chair with both hands in preparation to get up and walk...but the HR director intervened.
We solved the problem by adding an addendum to the original IP agreement doc, listing all my side projects.
I felt pretty weird on my first day on the job. :D
Side Story: A few weeks on the job, I needed a special software utility to help do my work. That same VP (who is now the CEO) made me explain to him, one-on-one and for nearly an hour, on why I needed that software. That utility cost $45 USD. Pretty sure he didn't like me.
Many silicon valley giants were built off of moonlighters who quit their day job to build companies who later ate that day job, and the company would much rather promote you for new work than potentially miss out.
I tend to fluctuate between spending zero hours a week to side stuff and 40 hours a week, in phases, and while I get pretty cool work done, it's hard to make money on an inconsistent pattern.