How did the Bible come to contain the books it does?

Q. A student I know is exploring the different religions right now.  He recently asked me how the Bible came to contain the books it now has in it.  Why were these put in, and others left out?  And why does the Catholic Bible have more books than the Protestant Bible?  What would you recommend I tell him?

The formation of the biblical canon (the collection of the books in the Bible) is easier to see first in the case of the New Testament, because that process was witnessed by history.  No one person or group sat down and decided what books would be in the New Testament (despite what you or your friend may have heard people like Dan Brown claim about the Council of Nicea, which never actually discussed the canon).  Instead, books that stood the test of time through continuous use in diverse Christian centers were eventually accepted by almost all believers. Books that were judged inconsistent with the other approved books came to be recognized as edifying, but not scriptural. This process was basically complete by the time Athanasius of Alexandria wrote his festal letter for AD 367, which contains the first listing of the New Testament books as we know them today.  A few remaining differences among centers were ironed out in the years that followed.  We can infer that a similar process of community acceptance and use over time had earlier created the Old Testament canon.

This is the historical perspective.  But from a theological standpoint, as one of my seminary professors once put it, “The Holy Spirit bore witness to the church corporately about what books should be included.”  In other words, the contents of the Bible were ultimately determined not by human authority, not even by the authority of the worldwide community of Jesus’ followers, but by divine authority.  No sooner did the church recognize these books than it submitted itself to them.  The church does not say, “The Bible is our book, and we can do with it whatever we want” (including dropping or disregarding teachings or whole books that are no longer in favor).  Rather, the Bible is God’s book, and the church is responsible to understand and obey its message.

An icon of St. Athanasius, who did not determine the biblical canon, but who was the first to list the New Testament books as we know them today.

The Catholic Bible has some extra books because it includes several that were written within the Jewish community in Greek before the time of Jesus.  (The Old Testament books were written instead in Hebrew and Aramaic.)  Catholics describe these books, which Protestants call the Apocrypha, as deuterocanonical, meaning that they were first disputed before they were accepted.  Eastern Orthodox Christians use this same term to mean that these books are of secondary authority.  For fuller details about these extra books, see this post.

This is a short answer to a very involved question, but I hope this information is helpful.