I think my favourite example of a "dirty hack that gets the job done" was by the developers of the DOS game Wing Commander. The game worked fine, but when exited, it output a strange error message to the console, complaining about some virtual memory issue. They couldn't figure out the cause, and it didn't seem to be hurting anything - so they opened the executable in a hex editor and changed that message to "Thank you for playing Wing Commander".
-----------------------------------------------------
An anonymous comment on the Desperate Measures blog. I'm old enough to remember the message and wondered why it was so polite. ;-)