What an idiot. Honestly, it’s pretty hard to get fired from most residency programs, but the one thing that will invert those odds is if there is some sort of unscrupulous exchange of money going on. If he had just been writing the letters for free to friends and family, I think it would have been a crap shoot whether he would have been fired or just reprimanded. If he was just giving these letters to patients at the hospital, I’m pretty sure the response would have been a severe reprimand but he wouldn’t have been fired.
I have not personally known any residents who have been fired but I have heard a handful of stories from faculty about people who have been fired from various institutions in the past. Essentially all of them involved some sort of unscrupulous “side business.” For example, one resident would personally charge his outpatients cash (on top of billing their insurance on behalf of the hospital).