Refactors of course come down to a tradeoff. I've always see it come down to, "do you want it on the deadline you set, or do you want it maintainable after?"
"By the deadline" is always chosen, and then management gets to complain about the incompetent developers who are just trying to deal with the hackathon-quality code they've been forced to write.