I know what I was thinking most of the time: I want to get this thing working and out there as quickly as possible.
Deadlines are probably the root cause of most of the world's most horrific hacks.
Also, I've never once had a boss turn to me and say "you know what, forget about writing any new features for now - just refactor the code that is working just fine but looks horrible."