As others have mentioned, there is a huge difference between retesting product with or without retreatment. If your product fails spec, you're allowed to perform some kind of treatment followed by retesting to prove your treatment brought the non-conforming product into spec. The treatment you apply needs to be scientifically valid and well documented so you can state your reasoning behind the treatment. The retesting is proof that your treatment was effective in this case. If you're performing some kind of chemical or heat treatment to reduce microbial load, it would be important to document the important aspects of the treatment, as well as performing all the usual final product testing to ensure the product meets all specs. Some treatments can damage organoleptic properties (as GM mentioned), so it wouldn't be right to release the product if it had good micro post-treatment but then failed you organoleptic testing.
Performing retesting on failed product without applying treatment is definitely not ok, you will absolutely raise some alarms with anyone that reviews your work if they see proof of that happening. The trouble is, most companies don't document the initial failed tests and only record the final "good" result. This makes this practice sort of hard to pin down by auditors if the management isn't being transparent. I believe there have been recalls put out when proof of this practice was found, because you won't be able to prove that your final "good" test invalidates your initial failed test without having applied some kind of remedial treatment.