The funny thing is, writing good code takes no longer than writing crappy code. For anything non-trivial, writing good code takes less effort, less time, minimizes aggravation, and saves you so much more time to work on other things that are important.
People have always struck me as masochistic when it comes to this. I think people write crappy software because they've become so habituated into acting "busy" that writing crappy code is just the thing into tricking them into feeling like they're doing what they ought to do (instead of just doing it right the first time, and going at a relaxed pace)