One of the very first morality lessons we learn in life is that morality is not dependent on observation. Quite simply, we should always do what's right, not just when people are watching. This sounds pretty trite, but in reality, this can be really hard sometimes.
As a resident, I had a patient who was critical, and the family for this patient was so irritating. I just couldn't stand them. And I knew that if I played my cards right, I could convince them to change the patient's code status to comfort care, so the family would get off my back, and I could get some sleep on call.
As a student, I could've written all of my notes without ever examining my patients. No one was checking the accuracy of my findings. Who would've ever known?
And as an attending, I find myself put into dubious situations, where I am presented with disability or FMLA forms or other nightmare paperwork, and it would be so easy to just check off a few boxes and call it a day.
Unfortunately, you can't do the right thing only when it's convenient. And so, sometimes medicine sucks. No one ever said doing the right thing was going to be easy, but it makes it a lot easier to sleep at night.