Those priests who are married were ALL married BEFORE being ordained. The Church has NO priests who married AFTER ordination. Thus, those who are priests already can’t marry now because they took a vow not to.
Homosexuals have chosen the priesthood in past years because it was a place that a man with no interest in having a traditional family could find a place in society. I know of several older priests who I suspect became priests because the gay lifestyle was simply not available at the time, ( say, pre-1965). The sexual revolution rewrote traditional norms such that everyone thinks "if it feels good, do it." Including liberal and homosexual priests who ignore the Church's teaching and no longer believe that homosexuality is sinful. Some of those priests became bishops. The rest is history.