There is not 'enough money'. If a reactor shows cracks in the steel in critical places, preventing this upfront might not be technologically possible and afterwards repairing might also be so expensive, that it economically makes no sense.
The big problem: if there is a technical problem, it is politically a very tough decision to close it, because of the costs involved (loss of profits from selling electricity, costs of decommissioning, costs of replacement, ...). Thus a more or less clear need to shutdown the reactor because of technical unfitness will conflict with financial interests and the scale of the money involved makes it worse.
One optimizes for longevity during design, as well as other factors which cost money. It may have, for example, been cheaper to construct, with a strict lifetime after which it would be taken down."Good design" is almost always subjective.
That politics drive nuclear operators to maintain plants past their lifetimes does not indicate poor engineering.