The cost of software is dominated by the cost to change it. Successful software inspires change, for decades if you’re lucky. Was the cost before first production even 1% of the total cost?
cost(total) = cost(initial) + cost(change)
and cost(initial) << cost(change)
(All the equations here are subject to net present value, but we intend to inform intuition here not automate any decisions.)
The cost of change combines the costs to:
Understand the current behavior
Modify the behavior without accidentally breaking anything
Validate that the whole will work as expected in production
Deploy the new version
cost(change) = cost(understand) + cost(modify) + cost(validate) + cost(deploy)
We can drive down the cost of validation with automated testing. Similar with the cost of deployment.
We design software, then, to reduce the cost to understand the behavior of the current system and safely modify that behavior.