If the Roman Catholic Church choosing Bible books gave the world the Bible, being infallible, then why did Rome reject or question the inspiration of James and Hebrews, then later accept it?
I believe there are some misunderstandings in this question that must be addressed first. The Roman Catholic Church did not choose which books would be in the Bible, per se. Second of all, the Roman Catholic Church is not infallible.
Rome did not reject or accept the Bible books. This was a church matter, and the state was only partially involved. You may be confusing infallibility and inspiration. I will do my best to clear up some of these misconceptions.
If I remember my church history properly, the Roman Catholic Church was not fully in force until the meeting in Nicaea in 325 AD. Before then, the councils were not a purely Roman affair. It was at the behest of Constantine the Emperor that the church decide on which books would be included in the New Testament.
Politically, he wanted to solidify his empire and religion was one of the ways he was going to do that. He muddied the waters between religion and politics. But he wanted the church to figure out which books would be in the Bible so he could solidify the Empire under Christianity.
Before the Council of Nicaea, there were other catalogs of the New Testament books. They were considering these, as well as some that created issues according to the guidelines for acceptable books in the New Testament.
The Roman Catholic Church was not infallible. The only one who can claim infallibility is God. The Roman Catholic Church, as well as any other part of the Church, is made up of human beings and none of them can be considered infallible. We are all imperfect people.
There were several criteria for considering books of the Bible. We must remember that there were other books they could consider as well that were not finally agreed upon as inspired by the Holy Spirit.
For instance, people still continue to suggest that Gnostic Gospels and other forms of literature written after the first century AD should be considered for canonicity. But these questions were settled long ago.
Some of the criteria for considering books were first that the book was written by an apostle or prophet. This disqualified anything from beyond the first century. Though these books claimed to be written by the apostles, the apostles were dead by the time they were written.
By claiming to be a book written by an apostle or prophet, or someone with apostolic influences like Luke (traveled with Paul) or Mark (influenced by Peter), but being when the person the book claimed to be written by was dead, the books were lying about their origin.
Another consideration for the inspiration of a book was the testimony of the Holy Spirit in the book. These are two of the reasons James and Hebrews were in contention until the end. Though they were part of other catalogs, like the Muratorian Canon list from the 160’s that contained all 27 books affirmed at the Council of Nicaea, the church had issues with them for these reasons.
For instance, James was written by the brother of Jesus. But he was not an apostle. He was an influential leader of the Christian church, the pastor of the church in Jerusalem. But he did not fit the criteria for authorship.
The book of Hebrews also had the same problem. Many of the scholars of the time believed that Paul wrote the book of Hebrews, giving it a leg to stand on as far as authorship. But the problem was that Paul always stated himself as the author, and the book of Hebrews did not give its author.
The theology of Hebrews tended the lineup with Paul’s theology at first glance. But because it was not deeply Pauline, many in the church had issues with its authorship. So it was also in contention. Second Peter was in contention as well.
Despite all these issues with authorship for these three books, the second criteria I mentioned was a large help to the church and finally accepting the inspiration and canonicity of these books. While authorship may have been in question in the church, what was not in question was the testimony of the Holy Spirit in the books.
Anyone who reads the book of Hebrews understands that the Holy Spirit speaks through the book to believers even today. There are many Scriptures full of faith we all quote and meditate upon daily. But beyond this, the entire argument of the book for Jesus’ supremacy over Angels, the great high priest, the greatest and ultimate sacrifice for sins, and other themes of the book Holy Spirit breathed.
There is also testimony from the Holy Spirit through the books of James and 2 Peter. Though James was directly related to Jesus but not an apostle, his book is prophetic in that it deals with the issues of his day and ours. It encourages Christians and the Holy Spirit speaks through the words of the book.
Second Peter challenged Christians in its day and us today. As it speaks about false prophets and teachers, the end times, Christian character formation, and other issues, it is useful for teaching. Perhaps one of the best scriptures to help us clarify inspiration and authority of scriptural books is 2 Timothy 3:16-17 which states that these books are God breathed, useful for teaching, reproof, correction, and training in righteousness.
These three books do all of that and more. And so the church finally as it was considering the canonicity of these books listened to the Holy Spirit and included them in the Canon. As far as consideration for any other books, we must remember that after the completion of Revelation in 95/96 AD, the canon of Scripture has been closed. No more books of the Bible can be written.