The metaphor is financial, and the useful part of it is the part most often skipped: debt has an interest rate. Some of it is cheap, serviced comfortably for years. Some of it compounds until the team is spending most of its capacity paying interest and shipping almost nothing.
Treating every shortcut as equivalent is why so many refactoring proposals fail to win funding. "The code is messy" is not an argument. "Every change to pricing requires edits in four places and we have shipped three pricing bugs this quarter" is.
Deliberate debt is legitimate
Shipping something simplified to meet a real deadline, knowing what was skipped and intending to return, is a reasonable trade. It becomes a problem only when the second half of the sentence is never honoured.
Write it down at the moment of the decision: what was deferred, why, and what would trigger paying it back. A note in the pull request costs nothing. Reconstructing the reasoning two years later costs a great deal.
Accidental debt is a process failure
Debt that nobody chose usually points at something upstream: no review, no shared standards, or a team under sustained pressure with no time to think. Refactoring the symptom without fixing that produces clean code that degrades again within a year.
If the same class of problem keeps reappearing, the code is not the thing that needs changing.
Pay it down where the work is
The instinct to rewrite the worst module is often wrong. The worst module may be stable and rarely touched, in which case its ugliness costs nothing. Improve the code you are about to change anyway, and the cleanup rides along with work that was already justified.
A useful heuristic: overlay your commit history on the codebase. Files that change constantly and are hard to change are where the interest is actually being paid.
Make the cost visible
Nobody funds an abstraction. People fund outcomes: fewer incidents, faster delivery, less onboarding time. Translate the debt into whichever of those it is damaging and the conversation stops being a negotiation about engineering aesthetics.
Debt is not a moral failing, and a codebase with none is usually a codebase that shipped too late. The distinction worth defending is between debt you chose and debt that chose you.

