If you're interested in coding, you should think about it as a career. If you're interested in coding beautifully, maybe not.
Though it's true, I've met a bunch of not-all-there programmers, part of the issue with code quality is that they don't have the luxury of forever refactoring.
Once a feature is done, the lid has to get slammed on it and nailed shut. If there's a bug that shows up during a warranty period, it might get fixed, but that won't involve a refactoring.
If a bug that's not a critical issue shows up outside of warranty, it gets put on the QC backlog, to be fixed...never. (One bug not considered critical by a team I once worked on: the mobile site won't let anyone who shows up with a mobile device log in. Has lasted > 1 year and still broken).
The factors that push the "finish it quick and never touch it again if you can help it" behavior are mainly aggressive schedules, and a desire to get home a little after 5PM.
Some of the best programmers I know work the vampire shift, drive their wife and kids nuts with it. But they don't work next to me in an enterprise.
If you're young, you can burn through the night, as I'd have done before the wife and kids (and to be sure, all my coding is hobby stuff, and I'm picky and refactor forever). Now, married, mortgaged and spawned, I have to pull 15 minutes together at a time to immerse myself before someone needs snot wiped or the house fixed. That or baffle my in-laws by coding like a madman and doing _nothing_else_ throughout the Thanksgiving weekend.