I had a similar experience, when my first priest (who also had taken a vow of chastity with his religious order), who ran my RCIA, heard my first confession, gave me first communion and confirmation, led the World Youth Day trip I went on, etc. left his priestly and religious vocations to marry his former secretary. He also had been a supporter of homosexuality including homosexual marriage, among other problems.
Of course we should want priests to be worthy men who are orthodox in their beliefs, moral in their living, and faithful to their vocations. But we also recognize that they still have free will and we are all fallen creatures, prone to sin. There will be people who fall away, as well as great sinners who are converted, and of course people who do both at different times of their lives, in whatever order. We need to remember that we place our faith in Christ and in God's faithful guidance of the Church as a whole, not any imagined impeccability of members of the Church in general or the clergy in particular.
I'm a little confused about the question you've used as a title for this thread. Holy Orders doesn't take away free will. Certainly the Church must be discerning about who is ordained to the deaconate and the priesthood, and it's my impression that standards have gotten steadily stricter over the last 20 years or so in this regard. But there are still a lot of older priests who never should have been ordained (not that most older priests are in this category of course!) and even now at least a few bad apples are still likely to manage to get through anyway by telling vocations directors and such what they want to hear (or through bad decisions by those who ought to have separated the rascals out before or during seminary), and others will go bad after being ordained. It's sad but practically inevitable.
Edit: Also, some priests are also actively removed. For example: ncregister.com/daily-news/for-father-bourgeois-todays-the-day/
Why aren't more priests removed in this way? I'd wager it's a complex matter of bishops not being aware of the problems, legitmate caution and careful legal processes related towards sacking priests who appear unorthodox, and, yes, possibly excessive caution about this in some quarters as well.