That's incorrect. I have patents that belong to companies, but it is because I agreed to it in the employment agreement.
If you want to work for someone else and keep your intellectual property you must negotiate it in the employment agreement (good luck getting hired).
A major corporate monster I once worked for claimed in their employment agreement that they owned my thoughts too! Meaning as long as I was employed by them if I was home sitting around and doodling and I came up with something, they owned it. I stayed with them about two years.