From what we can gather in The Scarlet Letter, Rev. Arthur Dimmesdale is a trained Oxonian whose excellent reputation as a scholar and as a dedicated minister precedes him.
Dimmesdale represents one of those rare cases in which all the good causes a bad. In other words, he reunites every single characteristic that would make a man seem perfect: He is young, intelligent, educated, seemingly pious, a good leader, and a great public speaker. All these attributes make him the most beloved and admired man in the settlement. So admired he is that even the town elders turn to him for advice, and even to give justice to those who have sinned- like Hester, of all people.
It is very possible that having so many things in his favor has made Dimmesdale quite comfortable with himself and his status. So comfortable, in fact, that he thinks of no consequences when he engages in his affair with Hester. We can imagine the shock he suffers when he realizes that he is the unwed father of a child from a member of his own flock!
Moreover, his ego must be altered as well. He chooses to keep quiet about Hester's situation and, although he grudgingly accepts to question her at the scaffold, he does not flatly refuse to do it. This can very well be because he is used to the idea that he is a leader and a model to be followed. His denial is not about the sin he commits but about the canon that he has failed.
Hence, when we find that he has carved his very own scarlet letter on his chest and that he self-mutilates for the very reason of his guilt, we must ask ourselves whether he would have felt just as guilty if he had not been found out. What if Hester did not get pregnant? Would she still be his lover?
In conclusion, Arthur Dimmesdale makes much of his role in the community because he never quits it, nor sacrifices it. He sacrifices his own flesh but does not flinch to give up the rights to lead his flock, albeit hypocritically.