Would the world definitely be a worse place if the laws were amended to say "any software developer owns equal IP rights to the code they create as part of their jobs along with the company, so either party can do anything they want with it"?
I'm not sure it would - although it disadvantages the companies compared to the current situation, it's not like they would choose to stop hiring devs to work for them - and that's just a legalisation of the currently unethical behaviour that you think is definitely a worse situation to have?
It's interesting to think about, at least!