Code that belongs to the company is ultimately the responsibility of the stockholders and their board. As an at will employee with no equity, I will give them exactly what they ask for in their code.
At each job, I will go above and beyond the call of duty once, to gauge the reaction. At some jobs, I get a cash bonus. At others, I just get a pat on the back. The last two jobs in a row, I was told to not do that again. So I didn't.
Don't be an apologist for bad management. I'm not going to do the right thing if I could get fired for it.
I also won't discount the frictional costs of changing teams. If you take two identical developers and switch their jobs, each of their teams would see a temporary hit in performance as each one gets acclimated. But they will eventually get to the point were their team is exactly as efficient as it was with the other employee.
That gave me a chuckle.
(Though, of course, some social intelligence goes a long way. No need to actually know how to code.)