I'm sure you have both occurring, ie. malignant programs and sub-par residents/fellows. Excluding the outright malignant programs, and effort should be made to make sure that residents perform at a certain level before they're advanced and certainly before fellowship application time comes. I know of plenty stories of residents in other specialties having been held back for not performing at a certain minimum level. Some were held back as little as 3 months, while others were forced to repeat an entire year. Again, some of this may have been a combination of a program having too high expectation of the people they've hired, but some of it also fell on the individual residents who just weren't as sharp.
Then again, in other specialties, it's much easier to spot poor performers. They may come close to doing real harm to patients, for example, and thus need to be stopped/remediated asap. Whereas in pathology, it is much easier to coast through. After all, faculty shoulder all responsibility of signing out cases. In such a system, it's not difficult for some residents to fake a minimal amount of know-how. Grossing specimens may be an issue for some, but again, "mistakes" can probably be covered up, and once it comes time to review slides with faculty and sign the case out, what "mistakes" may have happened at the grossing may never come to light.
But in the case of the OP vignette, the resident in question has been obviously allowed to coast, despite plenty of people having noticed deficiencies, that could and should have been addressed earlier.
Bad karma all around.