The Catholic Church did a lot of editing / selection of what went in there, using “Sacred Tradition” as their primary justification.
Literary quality and coherence were actually optimized pretty well in the selection process; if you don’t believe me, read an apocryphal gospel sometime. They’re basically Jesus fanfic of various stripes, much more ridiculous than the ones deemed canonical, and the vast (secular) scholarly consensus has them all written in the second or third centuries (excepting the Gospel of Thomas).
Then again, since many apocryphal gospels were written to buttress theologies different from the mainline one, it was easy to have them rejected for that reason alone.
Literary quality and coherence were actually optimized pretty well in the selection process; if you don’t believe me, read an apocryphal gospel sometime. They’re basically Jesus fanfic of various stripes, much more ridiculous than the ones deemed canonical, and the vast (secular) scholarly consensus has them all written in the second or third centuries (excepting the Gospel of Thomas).
Then again, since many apocryphal gospels were written to buttress theologies different from the mainline one, it was easy to have them rejected for that reason alone.