Pope Gregory the Great said (Letter CLXVII, Question 1):
Question I. Concerning a presbyter or deacon who falsely claims to be a bishop, and those whom they have ordained.
Reply. No consideration permits men to be reckoned among bishops who have not been elected by the clergy, demanded by the laity, and consecrated by the bishops of the province with the assent of the metropolitan624624 The same requisites of ordination of bishops are laid down in Lett. X. chap. 6. . And hence, since the question often arises concerning advancement unduly obtained, who need doubt that that can in no wise be which is not shown to have been conferred on them. And if any clerics have been ordained by such false bishops in those churches which have bishops of their own, and their ordination took place with the consent and approval of the proper bishops, it may be held valid on condition that they continue in the same churches. Otherwise it must be held void, not being connected with any place nor resting on any authority.
Yet we have canon law:
Can. 377 §1. The Supreme Pontiff freely appoints bishops or confirms those legitimately elected.
Gregory seems to exclude a Pontiff from freely appointing a bishop, yet canon law today allows that, and would seem to be the norm. Gregory would seem to view many, if not all, bishops today as illegitimate.
Note: in NO WAY is this to be taken as sedevacant in nature, intent, will or idea. Rather, let the focus be: on this point, how did the Church get from point A to point B when they seem to be contradictory? What authority did Gregory have in answering the question, and why has the Church developed a different position?