My theory – based on us seeing numerous violations of the Prime Directive from main characters – is that the interpretation of the rule is “you better be willing to risk your career if you break this,” not “your career is 100% over if you break this.”
It’s a heuristic, and a good one, but there seems to be in-universe exceptions for exceptional cases.