But some of the things they're trying are just so new that unexpected failure modes are bound to appear.
It would have been better for them if detecting the unexpected failure mode of supercooled LOX penetration of the carbon fibre windings on the helium bottle had been done on the ground in a test rig rather than in a complete stack on the launch pad. That's what testing in aerospace is meant to do and part of the reason launches are so expensive.
SpaceX is now required by launch customers to carry out hotfire tests without the payload being integrated -- this means the launch vehicle has to be rolled out to the pad, hotfired then returned to an integration facility, have the payload installed and then the completed stack rolled out to the pad again. This adds extra costs in time and money to a launch. It may be that in the future, after racking up a number of trouble-free launches their customers will opt for the cheaper option of integration/rollout/hotfire/launch but for now the cost of the extended procedure is going to have to be eaten, probably by SpaceX. Thorough testing might have been cheaper in the long run.