It's a hazy issue. The rule of celibate bishops seems to have begun sometime after Chalcedon, but even then wasn't so strong of a rule. In the Coptic Church at least, there was a married man who became Metropolitan of Cairo around the tenth century, but Abba Severus ibn Muqaffa wrote about him in a negative light due to his rich status and his controversies around eyeballing the papacy. One could say the rule of married bishops isn't really a rule, but more so an accepted reality eventually during the Middle Ages.
One can argue that as the role of the bishop became much larger than it was in the earliest centuries of Christianity, it became almost impossible to find anyone married who's willing to be one or qualified enough to become one. As the monastic communities strengthened after Chalcedon, more of the qualifications fell on them. What presbyters do now is what the role of the bishop was in the earliest centuries of Christianity, so it would make sense we would no longer expect married men to fill the service of the ministry of the episcopacy. So celibate (and monastic) bishops became the status quo as less and less married men became bishops, until it got so rare, it became a "rule" that only monks are allowed to be bishops.
Comments
One can argue that as the role of the bishop became much larger than it was in the earliest centuries of Christianity, it became almost impossible to find anyone married who's willing to be one or qualified enough to become one. As the monastic communities strengthened after Chalcedon, more of the qualifications fell on them. What presbyters do now is what the role of the bishop was in the earliest centuries of Christianity, so it would make sense we would no longer expect married men to fill the service of the ministry of the episcopacy. So celibate (and monastic) bishops became the status quo as less and less married men became bishops, until it got so rare, it became a "rule" that only monks are allowed to be bishops.