I bought a new battery a few years back that wouldn't hold a charge. They recharged it at the local mechanic's shop and checked by charging system and the battery both of which tested good.
After the 2nd or 3rd visit he replaced the battery with another new one at no charge (this is before such guarantees were commonplace) and the problem disappeared.
I don't know if he every figured what the problem was (or tried for that matter) but it reinforced to me that is quite possible to by new parts from good suppliers (Interstate Batteries in this case) and have those parts appear good but, in fact, be defective.
Any parts which are mass produced will inevitably distribute some that are defective.
Some manufacturers have very low quality standards and therefore release a large number of defective parts and some have higher standards.
FWIW: Consumer Reports just tested auto batteries this month. I have the test results in a PDF file if anyone is interested in a copy