The law of celibacy has no doctrinal bearing in the Catholic
Church--it is a mere disciplinary law.
Even today, there are married Catholic priests in the United
States. Each is a former Episcopalian priest who joined the
Catholic Church. There are Uniate Churches, churches in
union with Rome, e.g., the Greek Byzantine Church, that
have a married clergy.
Priestly celibacy became law in the Roman Church in the
6th century.
It must be noted that neither verse requires nor encourages
marriage to those in holy orders; they simply reflect the state of
those in orders in the apostolic Church. It offers no mandate
nor counsel for the universal Church either then or now.
It was the state of the early Church and available clergy.