Exactly. Our Popes may TEACH infallibly on matters of faith and morals, but they are not infallible people, and they are not IMPECCABLE people either.
We have had some rotten kings throughout history, but the institution of the monarchy doesn’t depend on whether or not kings are good or bad.
We have had some rotten presidents, rotten leaders, rotten “religious men and women”. . .
We don’t claim that because we had one, two, four, or more (pick any number) of a particular “occupation” or “religion” who have been bad apples that the occupation or the religions (or any other subject) is bad. . .
One could also quietly murmur the word. . .“Judas”. Hey, wasn’t he appointed to the apostles by Christ Himself? One out of twelve went really, really wrong.
So, maybe out of say 300 popes we had a dozen REAL bad apples (I don’t think it’s been quite that many, but let’s just say it.) We aren’t doing all that badly, comparatively speaking.
And let’s not forget how many Popes were saints, including some from relatively recent times (Pius X) not to mention one whom we hope will soon be recognized as such. . .
JOHN PAUL II THE GREAT