Under battle conditions, accidents occur, agreed, but one can't deny the incompetency of the people involved who can't perform in the scenario in which they are supposed to work at the first place. Why would you station sailors on most crucial arm of Navy who can't work at their best in war time. Their failure caused huge loss to PN as submarine like PN Ghazi was way too important.
I agree friendly fire and blue on blue attack occurs, that's why there is thorough investigation, not a cover up or brushing off the incompetency of the people involved.
For US destroyer accident, it was failure of US Navy as they overlooked a fault in the system which caused the loss.
Again, in military you don't find excuse for failure rather accept the failure. Its about accepting the incompetency and learning from it.
That's how any military force evolve. When US planned OBL raid, they were skeptical as similar raid to save American diplomats taken hostage in Iran failed. They lost their helicopters and few men while attempting Iran rescue. Iran failed rescue attempt was learning event for US Special forces.
Ask any military person on this forum, whatever the cause has been, one can't ignore that accident occurred due to lack of efficiency of the sailors at that situation.