It is all about perspective:
- You saved the day and you are a Hero by fixing the product
- You left around messy unclean code and you are lousy developer
I think your are both right, congrats! Cleaning time...
You have a piece of functionality that you need to add to your system. You see two ways to do it, one is quick to do but is messy - you are sure that it will make further changes harder in the future. The other results in a cleaner design, but will take longer to put in place.
Technical Debt is a wonderful metaphor developed by Ward Cunningham to help us think about this problem. In this metaphor, doing things the quick and dirty way sets us up with a technical debt, which is similar to a financial debt. Like a financial debt, the technical debt incurs interest
Who is going to repay the technical-debt you left behind? Even if you did it to the best you could, others seem to think you rushed and left a lot of technical-debt.
Every project has maintenance even non-critical websites. Therefor someone should estimate if keep cleaning is worth it. You made the call and others are challenging you on it. Don't feel bad, even if you don't 100% agree you could say it wasn't your call and you should have notified someone to make the call on leaving the errors and messy patches. Make friends, find the win-win and fix the code if needed.