>yet contracts forbid them?
This part is likely exaggerated.
Yes I guess there are a few companies really "forbid" them (from what I saw on HN Apple seems to be an example, but I don't have any first hand experience). But for the majority of the companies, they just claim the copyright of your side projects _by default_, instead of outright forbid them.
The why of the copyright claim part is already explained by the essay you linked so I'll not repeat that. Even with that in place, as others pointed out in threads, at least in California (I don't know if other states have similar laws) you can still get the copyright back to yourself, as long as:
1. You did not use your employer's time (do your side projects on weekends, nights, holidays, etc.)
2. You did not use your employer's equipment (use your own computer, network, etc.)
3. Your side project isn't related to your employer's business
The first 2 requirements are easy to met, the 3rd one:
1. If your employer is like Google that does almost everything, it's hard to met. But Google does provide a straightforward way for employees to apply to get the copyright of their side projects released to them.
2. If your employer is only on a few fields, as long as your side project is on unrelated fields it shouldn't be _that hard_ even if this has to go to court (but this is not legal advice, obviously). If you really plan to do side projects that puts this muddy, then there are other things to consider (conflict of interest, etc.) that's far beyond the scope of what we discussed here.
Also, if by "side projects" you mainly mean open source projects:
1. If it's purely your personal open source project that has nothing to do with your employer, see the discussions above.
2. If it's actually open source project/contribution that's related to your work (for example, your company is using an open source project and you are fixing an issue that affects your use case), _in theory_ you should be using your employer's time and equipment to do that (as that's really part of your job), and your employer should get the credit for this work (e.g. use your employer email in the commit).