Except that Starfleet itself had rules in place that superseded "The Prime Directive," we know because "The Omega Directive" was such a rule. General Order Number 1 wasn't a simple black and white rule; it could only be a guideline. Each captain walked that line with their own interpretation and each one crossed that line in someone else’s opinion. We don't see punishment to the various series' captains, so apparently Starfleet didn't see the deviations as problems for those captains in particular.
We do know it was a serious thing, so serious that Admiral Satie tried to blackmail Picard with his deviations. We also see that she didn’t get very far.