In undertaking performance re-engineering analysis for the US Department of Health and Human Services and another commercial client, I've come across several cases where code violates what would be considered good architectural practices -- resulting in something called "technical debt," a phrase gaining attention.
Fixing code -- especially Java -- costs a significant amount of money. In the cases I've been involved with lately, the applications were being slated to move to a cloud model, and so were being "bottom up" SOA enabled. APIs were identified to expose to the wider world, and, in some case because the existing code was just too broken, select processes were just being wrapped in new Java service layers.
Read more about the concept thought up by Ward Cunningham. No matter how important an application may be, the patches, cobbled-together fixes, and duct tape approach to keeping the lights on all add up to larger costs down the road. And maybe not too far down that road -- giving new meaning to "paying it forward" when your developers spend the effort to refractor code.