@brian.shapiro: That is a necessity sometimes, I do it myself. The issue for me only arises when you re-write everything all the time as that is not very agile.

Technical debt is a real problem in Agile development, and refactoring is a must. As Dr Herbie intimated, it a matter of negatiing that need to rewite just for the sake of a re-write.