And how does it work in CA? AFAIU, there're laws which prevent such limitations in most cases. I.e. everything which is done on the person's time is their own choice.
It is hard to find something that can't somehow be considered to compete with Apple. And in CA you can be let go for no reason, so...
For example, I couldn't get approval to contribute patches to a gallery plugin for Wordpress that I was using for my personal blog, because you know, the Photos app is a gallery of photos.
I stayed a few years for a few reasons, first because it is still a good company with a “real” product, and also because 99% of my time there was spent working on open-source (clang/llvm).
When I decided to quit, it was in part because of their open source policy.
There are tons of developers who not only don't care about writing open source software on the side, actually go home after working 8 hours a days on computers and decide not to do any code at all and spend time on other hobbies, with their family, etc.