The 39 books of the Old Testament in a Protestant Bible are the same 39 books in an Orthodox Jewish Bible, which is Biblically significant (Romans 3:1-2). The Jews count these as either 22 or 24 books, using the following rules in distinction from the typical Protestant enumeration:
Historically, these canonical Old Testament books were divided into three groups by the Jews - The Law, the Prophets, and the Writings (Luke 24:44). From before the time of Christ, to the present day, these books have been regarded by Jews as being intrinsically superior in comparison to any other writings, as attested to by the first-century Jewish witness Josephus (37-100 AD):
Josephus (37-100 AD) - Against Apion - Book 1
8 For we have not an innumerable multitude of books among us, disagreeing from and contradicting one another, [as the Greeks have,] but only twenty-two books, which contain the records of all the past times; which are justly believed to be divine; and of them five belong to Moses, which contain his laws and the traditions of the origin of mankind till his death. This interval of time was little short of three thousand years; but as to the time from the death of Moses till the reign of Artaxerxes king of Persia, who reigned after Xerxes, the prophets, who were after Moses, wrote down what was done in their times in thirteen books. The remaining four books contain hymns to God, and precepts for the conduct of human life.
It is true, our history hath been written since Artaxerxes very particularly, but hath not been esteemed of the like authority with the former by our forefathers, because there hath not been an exact succession of prophets since that time; and how firmly we have given credit to these books of our own nation is evident by what we do; for during so many ages as have already passed, no one has been so bold as either to add any thing to them, to take any thing from them, or to make any change in them; but it is become natural to all Jews immediately, and from their very birth, to esteem these books to contain Divine doctrines, and to persist in them, and, if occasion be willingly to die for them.
Notice especially that Josephus is speaking of what "is natural to all Jews", and says that "during so many ages as have already passed" - that is, for a considerable time before himself - "no one has been so bold as either to add any thing to them, to take any thing from them, or to make any change in them". This would indicate that he views his statement on the 22-book canon as rather universal, established, and uncontroversial.
The Book of Jubilees, which predates Josephus, being written around the 1st century BC, also contains a reference to the 22-book canon:
The Book of Jubilees 2:36-40
36 And He caused His commands to ascend as a sweet savour acceptable before Him all the days. There (were) two and twenty heads of mankind from Adam to Jacob,
37 And two and twenty kinds of work were made until the seventh day;
38 This is blessed and holy; and the former also is blessed and holy;
39 And this one serves with that one for sanctification and blessing.
40 And to this (Jacob and his seed) it was granted that they should always be the blessed and holy ones of the first testimony and law, even as He had sanctified and blessed the Sabbath day on the seventh day.
Likewise, after discussing the 5 books of the Torah, the Talmud enumerates 8 Prophets and 11 Writings, thereby using the 24-book count. And, the apocrypha is excluded, whereas the inspired books of the Protestant canon are included:
Babylonian Talmud - Bava Batra 14b
8 The Sages taught: The order of the books of the Prophets when they are attached together is as follows: Joshua and Judges, Samuel and Kings, Jeremiah and Ezekiel, and Isaiah and the Twelve Prophets.
11 The baraita continues: The order of the Writings is: Ruth and the book of Psalms, and Job and Proverbs; Ecclesiastes, Song of Songs, and Lamentations; Daniel and the Scroll of Esther; and Ezra and Chronicles.
Similarly, another reference in the Talmud mentions the threefold division of the Torah, the Prophets, and the Writings, and says that they number 24:
Babylonian Talmud - Taanit 8a:3
3 Similarly, Rav Adda bar Ahava would review his learning twenty-four times, corresponding to the twenty-four books in the Torah, Prophets, and Writings, i.e., the Bible, and only afterward go before Rava to study with him.
Other references in the Talmud to the 24-book canon include Bava Batra 11a:9, 13b:5, and Tractate Kallah Rabbati 10:14.
Also, the book of 2 Esdras, thought to have been written around the 2nd century AD, references a 24-book canon:
2 Esdras 14:42-48
42 And the Most High gave understanding to the five men, and by turns they wrote what was dictated, in characters which they did not know. They sat forty days, and wrote during the daytime, and ate their bread at night.
43 As for me, I spoke in the daytime and was not silent at night.
44 So during the forty days ninety-four books were written.
45 And when the forty days were ended, the Most High spoke to me, saying, "Make public the twenty-four books that you wrote first and let the worthy and the unworthy read them;
46 but keep the seventy that were written last, in order to give them to the wise among your people.
47 For in them is the spring of understanding, the fountain of wisdom, and the river of knowledge."
48 And I did so.
There are also many passages from early Jewish Midrash which reference a 24-book canon:
Midrash Rabbah - Kohelet Rabbah 12:12
"More than that, my son, be careful: Making many books has no end, and much prattle is exertion of the flesh" (Ecclesiastes 12:12).
"More than that [mehema], my son, be careful" - [of] confusion [mehuma], as anyone who introduces more than [these] twenty-four books into his house introduces confusion into his house, such as the book of ben Sira and the book of ben Tigla. "And much prattle is exertion of the flesh" - as they were given for prattle and were not given for exertion.
Midrash Rabbah - Bamidbar Rabbah 14:4
"More than that, my son, be careful" (Ecclesiastes 12:12) - the Holy One blessed be He said: I have written for you twenty-four books, be careful not to add to them. Why? “Making many books without end” (Ecclesiastes 12:12) - anyone who reads a verse that is not from the twenty-four books, it is as though he read the books of heretics. That is, “be careful making many books,” as anyone who does so has no share in the World to Come.
Midrash Rabbah - Shir HaShirim Rabbah 4:11
Rabbi Huna and Rabbi Ḥalafta of Caesarea say in the name of Rabbi Shimon ben Lakish: Just as this bride ornaments herself with twenty-four ornaments and if she is missing one item [it is as though] she has nothing, so too, a Torah scholar must be familiar with the twenty-four books [of the Bible], and if he is missing one of them [it is as though] he has nothing.
Also see Shemot Rabbah 41:5, Kohelet Rabbah 12:11, and Bamidbar Rabbah 13:16, 14:18, 15:22, 18:21 from Midrash Rabbah, and Ki Tisa 16:2, Korach 12:1, and Vayeilech 1:1 from Midrash Tanchuma, for references to the 24-book canon.
Nothing outside of these books was ever quoted as Scripture in the New Testament. That is to say, not a single verse from outside of these books is attached to a statement such as:
Note that a reference or an allusion to a text in the New Testament is not good enough to establish its canonicity. Jude cites from the book of Enoch, and potentially the Assumption of Moses (Jude 1:9, 14-15) - neither of which are considered canonical by Catholics or Eastern Orthodox. Likewise the Apostle Paul cites the Greek poets Aratus (Acts 17:28), Menander or Euripides (1 Corinthians 15:33), and Epimenides (Titus 1:12). There are also many references or allusions to other apocryphal books not considered inspired by Catholics or Eastern Orthodox, such as 3 & 4 Maccabees, the Psalms of Solomon, the Testament of Levi, and the Testament of Joseph. Therefore, in order to declare a text canonical based on New Testament citation alone, it would need to be formally cited as Scripture, in the manner of the references above.
Therefore, the New Testament and Jewish evidence is strongly in favor of the Protestant view that there were 39 books, which were considered ontologically different from other writings, in that they were recognized as having been inspired by God (2 Timothy 3:16). Those to whom the oracles were delivered (Romans 3:1-2) did not recognize the additional apocryphal books as having been inspired, and no direct quotation of them as Scripture compels us to accept them in spite of that.
The Old Testament canon of the Catholic Church contains additional books from the intertestamental period, written primarily in Greek.
The first time that this canon was infallibly defined by the Roman Catholic Church was during the Council of Trent (1545-1563 AD), which repeated the canon elucidated in the earlier local North African councils of Hippo (393 AD) and Carthage (397 AD):
Council of Trent - Session 4 (1546 AD), Decree concerning the Canonical Scriptures
They are as set down here below: of the Old Testament: the five books of Moses, to wit, Genesis, Exodus, Leviticus, Numbers, Deuteronomy; Josuah, Judges, Ruth, four books of Kings, two of Paralipomena, the first book of Esdras, and the second which is entitled Nehemias; Tobias, Judith, Esther, Job, the Davidical Psalter, [containing] a hundred and fifty psalms; the Proverbs, Ecclesiastes, the Canticle of Canticles, Wisdom, Ecclesiasticus, Isaias, Jeremias, with Baruch; Ezechiel, Daniel; the twelve minor prophets, to wit, Osea, Joel, Amos, Abdias, Jonas, Micheas, Nahum, Habacuc, Sophonias, Aggæus, Zacharias, Malachias; two books of the Machabees, the first and the second.
But if any one receive not, as sacred and canonical, these same books entire with all their parts, as they have been used to be read in the Catholic Church, and as they are contained in the old Latin vulgate edition; and knowingly and deliberately despise the traditions aforesaid; let him be anathema.
The above definition - which, predictably and characteristically, anathematizes anyone who disagrees (to Hell) - is different from the Protestant canon in the following ways:
The situation with Eastern Orthodoxy is a bit more complicated. The universally-accepted Synod of Jerusalem (1672 AD) only mentioned Judith, Maccabees, Tobit, Wisdom, Sirach, and additions to Daniel as "Sacred Scripture". However, most Orthodox Bibles include the entire Catholic canon, plus 3 Maccabees, the Prayer of Manasseh, and Psalm 151.
Note that both of these declarations are over 1,500 years after Jesus Christ. Prior to these statements, which are recognized as infallible in both traditions, there was considerable historical controversy over the canon of the Old Testament. As compiled on this site, for instance, various early Church writers gave canon lists that omitted books from the Roman Catholic and Orthodox canon list:
Note that this is not an invalid argument from silence. When one is enumerating a list of books of Scripture, they do not leave out books which they are aware of, and they reckon to be inspired. Therefore, we can assume that each of these writers were, at the very least, not aware of them - meaning they were not in universal use in the early Church - or that they were aware of them, and did not reckon them to be inspired Scripture - which was explicitly stated by some of the above writers (e.g. Athanasius, Jerome, Rufinus, John of Damascus).
Rather than give my commentary on potential issues with the content of the Apocrypha itself, the following are quotations from a popular Roman Catholic commentary on the Bible, The New Jerome Biblical Commentary (1990 AD).
This is only an official commentary insofar as it bears the Nihil Obstat (review by the Censor Librorum for theological errors) and Imprimatur ("let it be printed", usually from the local diocease). According to the introduction, "The nihil obstat and imprimatur are official declarations that a book or pamphlet is free of doctrinal or moral error":
The New Jerome Biblical Commentary - Introduction to 1-2 Maccabees, pg. 423
Several complaints have been lodged against the historical reliability of 1 Maccabees. The nationalism of its author and the exaggerated importance he gives Judean events (1:41-43; 3:27-31; 6:5-13) are said to make his objectivity suspect. He is anti-Seleucid (1:9-10), and, moreover, he shows ignorance of the history, geography, and political organization of foreign peoples. His Jewish nationalism leads him to inflate the numbers of the enemy, so as to have a more striking divine intervention on behalf of the Hasmoneans. And he has erred in placing the death of Antiochus IV after the dedication of the Temple. These and other historical shortcomings are thought to discredit him as a reliable reporter of the period.
The New Jerome Biblical Commentary - Introduction to 1-2 Maccabees, pg. 424
To have its proper spot in history, 2 Maccabees 11 should be moved to follow chapter 8. As it now stands, chapter 11 errs in attributing this campaign of Lysias to the reign of the next king, Antiochus V Eupator (who succeeds Epiphanes in 2 Maccabees 10:10-11). The mistake occurred because the epitomist associated Lysias's campaign and the three letters from Epiphanes' reign (11:16-21, 27-33, 34-38) with the letter of his son Eupator (11:22-26). Assigning all the material to Eupator, the epitomist made this first campaign of Lysias follow the death of Antiochus IV, whereas in reality it had preceded it.
The New Jerome Biblical Commentary - Introduction to 1-2 Maccabees, pg. 424
This reformed chronology demands a revised sequence of the events in 1-2 Maccabees. The latter is correct in placing the death of Antiochus IV Epiphanes before the Temple's dedication (2 Maccabees 9:1-29; 10:1-9), and 1 Maccabees has the wrong order (1 Maccabees 4:36-61; 6:1-17). Antiochus died toward October of 164 BC (in the Seleucid year 148, if one begins the year in the spring, as B. M. Tablet 35603 does; in the Seleucid year 149, if one counts from autumn as 1 Maccabees 6:16 does), and the Temple was dedicated on December 14, 164 BC (1 Maccabees 4:52; 25 Kisleu, year 148 of the Seleucids, counted this time as beginning in the spring). Correct placement of Antiochus's death in 1 Maccabees requires the moving of 1 Maccabees 6:1-17 to precede 4:36-61.
The New Jerome Biblical Commentary - 1 Maccabees 1:1-10, pg. 426
1 Maccabees's author repeats the erroneous story of Alexander's deathbed division of his kingdom among "his servants," his officers who had been educated with him. Josephus (Antiquities 11.8.7 §346) contradicts this story, and the slow breakup of the empire - Seleucus occupied Babylon in 311; he and four others became "kings" in 306 - confirms his statement.
The New Jerome Biblical Commentary - 1 Maccabees 1:20-24, pg. 426
Antiochus Despoils the Temple (1:20-24a). Although 2 Maccabees 5:15-21 places this event after Antiochus's second campaign in Egypt, Daniel 11:25-30 (esp. 28) shows that it belongs after the first.
The New Jerome Biblical Commentary - 1 Maccabees 4:53-54, pg. 430
This day, 25 Kisleu, 145 (Dec. 17, 167) was exactly three years prior to the Dedication (1:54, 59). The date is confirmed by Josephus (Antiquities 12.7.6 §319) and is checked there by cross-reference to the Greek Olympiads. The two years of 2 Maccabees 10:3 are a mistake, one based on the author's incorrect dating of the death of Antiochus IV, which he knew preceded the Dedication, to 165.
The New Jerome Biblical Commentary - 1 Maccabees 6:1, pg. 431
Elymais: Ancient Elam (Genesis 10:22). There is no city by this name, which designates rather the country around Susa, particularly to the North and East. The city and temple(s) that Antiochus tried to pillage are in Persia (1 Maccabees 6:1), but the city was not Persepolis (2 Maccabees 9:2), about which the king would not need to be told. Both 1-2 Maccabees mislocate the city.
The New Jerome Biblical Commentary - Sirach 25:13, pg. 505
Ben Sira has more to say, as usual, about the evil woman or wife (23:13-26; 26:5-12, 22-27) than about the good one (26:1-4,13-18). His (mostly deplorable) comments should not be explained away or exaggerated; he simply reflects the kind of instruction the young Jewish male received at that time.
The New Jerome Biblical Commentary - Introduction to Baruch, pg. 563
Certain things indicate that the history Baruch presents is not even history in the sense that the narratives of these events in Kings are history. The historical books know nothing of the return of the Temple vessels (1:8-9) or of the presence of Baruch in Babylon (1:1). There is something of a contradiction between the prayer itself, which presumes that the Temple is in ruins (2:26), and the introduction, which presumes that the Temple is standing and that normal worship is carried on there (1:10, 14).
The New Jerome Biblical Commentary - Baruch 1:1-14, pg. 564
As 1:1b-2 stand, they indicate that the confession and prayer were composed "in Babylon, in the fifth year, on the seventh day of the month at the time when the Chaldeans took Jerusalem and burnt it with fire." The absence of a number before "month" is strange, but it is generally agreed that the fifth month is intended; the date of composition is just prior to Ab 7, 582, the fifth anniversary of the burning of Jerusalem on Aug. 25, 587 (2 Kings 25:8). That is the occasion for the assembly of 1:3 at which the confession and prayer were first read. But this understanding of the passage presents serious difficulties. First, the introduction (1:10-14) presumes that the Temple is standing and that the services are being conducted in the normal manner; 1:2 itself and what is known from other sources (2 Kings 25:8-10; Ezra 3:1-13) indicate that such was not the case in 582.
The New Jerome Biblical Commentary - Introduction to Judith, pg. 573
Because Judith is fiction replete with historical and geographical inaccuracies, it is difficult to date its composition (on the range of scholarly proposals from the 5th century BC to the 2nd century AD, see Zeitlin, Judith 26-31). The terminus ad quern is easily set at no later than the 1st century AD by a reference to Judith in the first epistle of Clement of Rome.
The New Jerome Biblical Commentary - Judith 1:1, pg. 574
In the twelfth year of the reign of Nebuchadnezzar who ruled over the Assyrians in Nineveh: A pseudo-historical preexilic date of 593 and a fictitious identification open the story. Nebuchadnezzar was the most famous of the Neo-Babylonian kings and ruled from 605-562. His father, Nabopolassar, together with Cyaxares, the king of the Medes, destroyed Nineveh in 612.
The New Jerome Biblical Commentary - Judith 4:3, pg. 574
Recently returned from captivity: This postexilic reference to 538 is inconsistent with 2:1 and is further complicated by mention of the rededication of the Temple, referring either to sometime after 515 or perhaps even 165.
The New Jerome Biblical Commentary - Introduction to Esther, pg. 576
The sections added by the Greek translator/author change the focus of the book and affect its teaching. Where the emphasis had been on the courage and resourcefulness of Mordecai and Esther it is now shifted to the intervention of God. Indeed, not only is the subtlety of the Hebrew story lost but the religious emphasis is so overdone as to be somewhat tedious.
The above quotes have had some abbreviations expanded, i.e., 2 Macc to 2 Maccabees.
The Canon of Scripture is not declared, but rather, recognized. God inspired certain writings, and it took the Church some time to recognize which books were of that inspired character. A book does not become inspired by fiat. The Apocrypha is not inspired by God in the way the Old Testament is, and therefore, it does not belong in the Bible. The Roman Catholic and Eastern Orthodox Churches are in error in this regard.
Some Roman Catholic and Eastern Orthodox Christians argue that the Septuagint was the Bible of the early Church, and the Septuagint contained the Apocrypha. Therefore, the Apocrypha is inspired.
This conflates the term "Septuagint", which has come to mean a Greek translation of the Old Testament, with certain Biblical manuscripts that are from hundreds of years after the time of Jesus, and contain other books alongside the Old and New Testaments, in Greek.
For instance, the three most important manuscripts in this discussion are typically as follows:
Therefore, a book being present in a later Greek manuscript of the Bible does not mean it was considered canonical at the time of Jesus Christ, or even that it was considered canonical at the time the manuscript was compiled.