It was material that went into a frangible rail built by one company for a fairing built by another company, integrated into a rocket built by yet another company. Where would NASA have the time to test each and every bit of material going into the many-tiered parts of the design? NASA is relying on the prime contractor to make sure their vendors are on the up and up. The prime is making sure their vendors do their due diligence as well. The failure in this chain of trust comes about when someone is blatantly lying about results. The lab manager was instructing his technicians to lie about results and also speed up testing equipment between customer visits.
Testing everything yourself works out well since you are receiving most of the raw material and doing the assembly either yourself or on site with a contractor. NASA doesn't built a lot of stuff themselves. Components can be so deep in levels of subcontracting that all NASA can do is just make sure everyone is adhering to proper engineering and manufacturing principles. The company that originally bought the aluminum I'm sure tested all of their finished components the right way but testing might not have been sufficient enough against how much stress the part is actually under during flight. Or testing weakened the part to the point where a failure was imminent but not obvious. Or the vendor doesn't really test their stuff extensively and relies on the customer to handle that. Either way, the part passes tests and gets sent to the customer where the they would integrate the part into their design and test it as well. Or not fully test it based on the idea that the next customer would test it. Who knows? Maybe they didn't test it hard enough or maybe it was most of a length of testing problem. The point is that NASA has neither the time or money to independently test parts and materials, they rely on their experienced contractors and subcontractors to do it.
If there isn't already, there needs to be some additional laws with government contractors to make sure those in a position of trust (like test lab technicians and their managers) receive no compensation based on whether or not material passes inspection or how much they test. Or force these kinds of labs to do independent 3rd party testing.