“Hardware is cheap, programmers are expensive.”
“Mediocre” programmers are expensive.
Good programmers are the bargain of the century.
If companies would just wise up enough to pay a good programmer 3 times as much as a mediocre programmer to do 10 times the work, do it right, and do it so that it can be maintained reasonably, any tradeoff would become moot. But companies generally don’t do this, which is probably one of the main reasons the best programmers go off and do their own.