Keeping a secret could mean that you can’t vindicate yourself. There might be a very good reason why you do what you do, but to tell that reason might hurt someone else. So, doing the right thing might require the appearance of doing the wrong thing.
The lesson to learn from this isn’t about self-sacrifice; it’s about not being quick to judge. Taking the hit for others is about understanding oneself. Not judging others for taking a hit is about understanding others. So, to be willing to take the hit for others first requires not judging others—and that’s harder.