Problems with work code:
- Deadlines: Whether it's someone yelling at you or you just being afraid you won't get something done in time, there's almost always a point where you'll throw together horrendous code you think you'll fix later and then 6 months later, hey it's still there!
- Differing Opinions: Code review can be good but what do you do when someone just disagrees with you on what is nice looking code? Working on your own project that isn't ever a concern since you are the master of the universe.
- Being Programmers: Most programmers want to try and improve, they'll write code for awhile then have that moment of "man this looks terrible, I should write it differently next time." Or they end up refactoring it right then and there, sometimes making a bigger mess.
- Grandfather Clause: Often you just end up stuck with very outdated code and have to hook up some horrible monstrosity to communicate with it. Usually a bigger problem at work vs home, where you can allow yourself to redo large systems.
That said you can write some pretty bad home code too, I hate to admit it but often trying to adapt new coding patterns to make my code more pretty or readable or accessible has just ended up making it more of a mess to me. I know everyone around here tends to throw bricks at each other over code style but usually the most important rule is that something works.