Those priests had the option to NOT take a vow of celibacy when they were ordained. They can’t change their minds and marry. To do that they must leave the priesthood (or be ordained under the eastern rites.) Only Roman Catholic priests take a vow of celibacy (that I know of.) I believe it is referred to as the Petrine rite (?)
Eastern rite priests, both Catholic and Orthodox, take a vow of celibacy if they are ordained before being married. It is only from these celibate priests that bishops are selected.