There is no way for any human activity to be perfect. Quality assurance is a statistical science, not some magic spell for perfect products. In other words, crap happens, and sometimes the checks and balances don't catch that crap before it gets boxed up and shipped.
Military ammunition is purchased in multi-million round batches, and despite the fact that the LC loading system is extremely good and extremely consistent, there WILL be a visibly bad round now and then. If it isn't grossly malformed, it can slip through the cracks and get included in a "lot." When the inspections on finished lots are conducted, those doing the inspection for government acceptance use a statistical model to select rounds, batches, piles, etc. of that lot for testing. If the offending round isn't seen because it isn't chosen by that model, it just "isn't seen." While the statistical selection (and pretty harsh go/no go criteria for testing) is really good at keeping what goes out to the field top-notch, it again isn't perfect.
As for "pristine," GI rifle ammunition must have a visible "annealing iris" on the shoulder and neck, which means finished rounds are not polished the way commercial rounds are. They will look kind of dingy and sometimes even slightly tarnished. A fresh can of GI ammo should not be "dirty," but it will definitely not look like commercial.