Flight hardware typically has much higher quality standards. Sometimes they use more exotic materials that don't have the background testing to ensure that quality. If you want to use a cheaper new seal material, for example, there's probably not much data available for its compatibility with hypergolic fuels. It's not uncommon to use one-off components in a design, which means they may not have the same type of well-tried process control during manufacture. Then you have the costs of maintaining hardware pedigree (chain-of-custody, maintenance of material test data, lot material coupons for later testing, some of which may need to be maintained in a bonded, climate controlled room etc.).
New materials and manufacturing processes will definitely help and I think SpaceX is doing good work here. But the demands of spaceflight adds constraints. Steel and titanium are the most common non-fatiguing materials. Steel may be too heavy so you might be left with only using titanium, which is much more expensive. And you still haven't done the compatibility testing etc. So while it's a trivial example, you can see how it can become a tough problem to factor in cost, quality, and speed.