Why no married men? Peter was married. He even had a mother in law.
It all seems based on Paul saying it was better not to be married.
It is a Catholic church rule, not even doctrine or dogma.
Most likely, priesthood in Middle ages was such a high level in the social order, with high material rewards in security and material comfort, that there was very stiff competition to be a priest.
This would be one way to trim down the competition.