You bring up a valid point. Can a priest who is unrepentant hear and absolve sins? If he is unrepentant can he oversee the daily sacrifice.
I have been assured by Catholics that those priests after all, are only human and sin just like the rest of us. (which of course, is not true because molesting children is not *sinning like the rest of us*)
Additionally, if his intent is *pure* then the sacrament is valid.
Catholics HAVE to take that position, even if for their own sanity. To take any other position would mean that no Catholic could ever be sure that the sacraments they received are valid.
If that’s the case, then there is no way of them knowing if their own baptism is valid and they’re not really saved.
Or if their own marriage is valid and they are not really living in sin.
So as a self-defense mechanism, they have no choice but to conclude and defend the concept that the priest can perform his duties independent of his moral character.