“‘They must not marry women defiled by prostitution or divorced from their husbands, because priests are holy to their God. Regard them as holy, because they offer up the food of your God. Consider them holy, because I the LORD am holy—I who make you holy.
“‘If a priest’s daughter defiles herself by becoming a prostitute, she disgraces her father; she must be burned in the fire.
“‘The woman he marries must be a virgin. He must not marry a widow, a divorced woman, or a woman defiled by prostitution, but only a virgin from his own people, so he will not defile his offspring among his people. I am the LORD, who makes him holy.” Leviticus 21:7-9, 13-15
In the Old Testament, the Jewish priests were allowed to marry and also have children.
In the New Testament, Peter (Simon), considered by some to be the first Pope, also had a mother-in-law which means he was married.
Jesus left the synagogue and went to the home of Simon. Now Simon’s mother-in-law was suffering from a high fever, and they asked Jesus to help her. Luke 4:38
Some in the ministry stayed single - most notably Jesus and Paul - by choice and preference.
So the decision to marry or not marry is purely up to the person. An unmarried priest/pastor/minister can focus more time on a congregation without the distractions of family.
But if you do marry, you have not sinned; and if a virgin marries, she has not sinned. But those who marry will face many troubles in this life, and I want to spare you this. 1 Corinthians 7:28
It is not a sin to marry or not to be married, however, if a person cannot control themselves sexually (priest or not), they should marry.
But if they cannot control themselves, they should marry, for it is better to marry than to burn with passion. 1 Corinthians 7:9