I was working on an old application of mine the other day, and when I say old I mean very old. It's a SqlWindows 5.0.2 application running against a 5.2.0 SqlBase on Netware 3.12. Development started back in 1993, it was finished in 1995 and runs more or less without problems ever since.
I had to add a few little features so I started sneaking around in the code, just to discover that I had very little experience back then and the code looked horrible. My first intention was to rewrite parts of the code, then I thought about modernizing a larger part so it would become more maintainable. But after a while I realized that I was about to rewrite code that was working perfectly, it was just ugly. I set up a quick calculation and estimated the time it would take to rewrite some of the ugly parts and I ended up with 2 weeks.
At the end I decided to add just the few new features to the ugly code and leave everything else as it is. 2 weeks of work cost a lot, especially when there is no business value in the investment. I was not willing to pay the cost of beauty.