Clerical celibacy didn’t really take hold until after 1054 and then it was all about money. Married priests wanted to leave their “assets”—church buildings, property, pastoral titles—to their sons. The church made celibacy mandatory to there would be no legitimate heirs to contend with.
Makes me think of the Christmas play in the movie Parenthood—best scene in the movie!