This question is identical to the question “Why do some people think that they are always right?” except that in a Christian forum, it has the added overtones that make it so much more than what the word calls a “psychopath”. (search it for more detail if interested)
But to your specific question “Why do some pastors think that they are always right?” and the one more sentence you wrote in the description area, this is my answer.
Answer: Because they have made themselves “God”. Mind you, neither a pastor nor a lay person ever IS God. But people like this THINK they ARE God. Oh, they will tell you they don’t think that at all! To check on this, just watch their behavior. Any person who is “never wrong” has made themselves “God” and are to be avoided. They will want you to worship them, praise them, glorify them and most of all, give them something, usually money, respect, non-questioning obedience. This is why you should find a way to avoid them or leave their company immediately and completely.
In other words: Answer: Get a new pastor if your pastor is never wrong. And if the only wrong your pastor will admit is something silly like spilling their coffee on the floor, that does not count as admitting they can be wrong.
The reason you should immediately leave their company is because you believe in God and therefore all your worship and obedience is to go to Him, not to the person or pastor who thinks they are all that and a bag of chips. They are as naked when defecating as all the rest of us. Never forget that. We are ALL fallen and sinful human beings. Some are just far worse than others.
P.S. Apparently it is normal for Satan to masquerade as an “angel of light” so why wouldn’t Satan want people to pretend to themselves that they are “God”? Know the source.