Anything that I do with my time, my equipment and my brain outside paid work hours belongs to me.Other things being equal, I would agree with you. But it seems like other things are far from equal in this case, because the project in question is in exactly the field that its author was being paid to work in by his employer.
If any related work that (the employee says) happens outside office hours belongs to the employee in that case, what is to stop someone from simply claiming that any good idea they have on the project their employer pays them to work on happened at home after hours, the prototype code they wrote to implement it also happened away from the office, and therefore they assert the rights to it personally and the employer had better pay them whatever they want or be prevented from using exactly the work they are already paying the employee to do for them?
I find it troubling that so many people are alright with signing away their personal rights.
So do I, but contracts are two-sided deals. The other side here is that software developers are typically paid a significant amount of money for their work already, and it seems fair to me that the person paying that money would expect clear rights to what they're paying for in return.
There is nothing to stop the employer and employee from incorporating some mutually agreeable condition that makes clear how the projects are split and who will get which rights, assuming such a mutually agreeable condition can be found. But as others have noted, for something that is so directly related to what an employee works on by day, there is an obvious conflict of interest.