There are two sources of rework. The first is improper understanding of the problem and solution. We cannot eliminate this kind of rework for three reasons:
The second source of rework comes from poor dependency structures. As the software changes over time, dependencies creep into it. As the dependencies increase, the code becomes ever more brittle. Changes that should be easy become gargantuan tasks. Modules completely unrelated to the changes at hand require heavy modification and risk malfunction. Eventually the development effort slows to a crawl because of the tangled nature of the dependencies. --UncleBob on comp.object
See also ReasonsToRefactor