When someone is paying me for a piece of software, then I make sure it's not a 'hack', but a 'clean' solution. (Of course, the definitions are not 100% objective to what is what there, it's my conscious guiding me.)
When I write something for myself on my free time (and I'm not working at the same company as poor Tilly for those who remember the story) then I reserve myself the right to code as I want to. If I feel for doing it sloppy, then I do. If I'm having a good day, I may do it more properly.
It's my stuff. I do what I want with it. If someone uses it, because I gave it to them, then they use it 'as is'. They'd better live with it. Or re-write it.
Everything went worng, just as foreseen.