From where did the Bible come? why does it contain the 39 books of the Old Testament and 27 books of the New Testament that it does?
anytime you have a question like this, the place to start is with the invaluable Christian Research Institute. www.equip.org They have a search box and you can type in any doctrinal query and usually get more than one free pdf article with citations on your point. I highly recommend this resource.
Regarding canonicity, here are some representative articles:
from equip.org:
….Constantine did not establish the New Testament canon. Instead, over a period of time the Christian community identified which books were divinely inspired while coming to grips with its own identity and mission. Robert Grant, a scholar specializing in the composition of the canon, writes that the canon was “not the product of official assemblies or even of the studies of a few theologians, but rather it reflects and expresses the ideal self-understanding of a whole religious movement which, in spite of temporal, geographical, and even ideological differences, could finally be united in accepting these 27 diverse documents as expressing the meaning of Gods revelation in Jesus Christ and to his church.”21No single person decided the canon, and the canonical process was functioning well before the time of Constantine.22
here is one regarding the authorship of the old Testament that concludes:
An objective and truly scientific handling of the evidence can only lead to the conclusion that Jesus Christ and the New Testament apostles were absolutely correct in assuming the genuineness of the Mosaic authorship of the Pentateuch (cf. Matt, 19:8: Mark 12:26; John 5:46-47: 7:19: Acts 3:22).
and here is one contesting the idea that Mormonism is truly a latter day revelation with its conclusion that:
Surely, at the very least, latter-day revelation would have to be in complete accord with apostolic doctrine. As Paul declares in Galatians 1:8, “But though we, or an angel from heaven, preach any other gospel unto you than that which we have preached unto you, let him be accursed.” It is precisely those doctrines unique to Mormonism, such as the plurality of Gods, eternal progression, and secret temple ordinances, which lack a biblical basis and in fact contradict biblical teaching. And the Mormon gospel of salvation by works stands condemned as another gospel from that of the inspired Scriptures.
Hebrews 2:3 asks a sobering question which highlights the foundation of the Christian message on the testimony of Christ and the apostles, “How shall we escape, if we neglect so great salvation; which at the first began to be spoken by the Lord, and was confirmed unto us by them that heard him” (emphases added). There is no biblical basis for expecting further revelation. The church’s task is rather to preach and teach and defend the faith once-for-all delivered unto the saints (Jude 3), until Christ returns.
and here is a whole list of other free and paid materials on the topic. Go get ’em.