Test code by running it.
Test a rocket by launching it.
Test a rocket by launching it.
Honestly I thought they would be live testing fuel exchange in orbit by now. Seems pretty far from it sadly.
What makes these launches “non-production” tests is that they are not carrying any valuable payload. Blowing up rockets like this is exactly what gives the company it’s advantage over competitors who try to anticipate everything during design stages.
It's true that other rocket companies are treating launches as production, but SpaceX has always been doing "hardware-rich" testing.
It is more like an "all or nothing" process.