Why did John XXIII take the name of an anti-pope?

What determines what name a newly elected pope will take for himself? I would think that he would choose a name that honors a previous pope who was known for holiness, charity, intellect, etc. Why on earth would John XXIII (in 1958) take the name and number of an anti-pope of the 1400s?

When Cardinal Angelo Roncalli was elected to the papacy, he chose the name “John” in honor of his father. Previous popes had, for centuries, declined to take the name because it had been the name of a famous anti-pope; but Cardinal Roncalli apparently did not harbor superstitions about the name as it had good personal associations for him. He took the number “XXIII” because he was the 23rd legitimate Pope John in the line of popes named John. As an analogy, there was an anti-pope in modern times who called himself “Pius XIII.” In the future, should another legitimate pope choose the name “Pius,” he will be “Pius XIII” even though an anti-pope illegitimately appropriated that name for himself.

DISCLAIMER: The views and opinions expressed in these forums do not necessarily reflect those of Catholic Answers. For official apologetics resources please visit www.catholic.com.