Some books are believed by scholars to have more than one author or to have been edited by others at a later time. Many of the books are believed to have been written at a much later time than the events they record.
There are extant books that were not included in the Biblical cannon but seem to have been composed and available at the same time as those that are.
As believers we pretty well accept the Bible as the Word of God and assume that he provided for recorders to write what he wanted included.
The Bible is a collection of stories about people and we are required to understand the lessons they teach by the way they lived and apply the truths to our own circumstances. Sometimes there are many ways to read and interpret each story. Different traditions and denominations apply different rules and applications to characteristics and actions.
The Bible is very complicated. It reveals the love and mercy and judgement of God. This is not a simple subject. It must be by definition, complex and intricate. I guess for something so important and far-reaching, I don't want it to be simple and uncomplicated. I like the fact that it is difficult to understand and time-consuming to read. I want it to have more than I will ever be able to comprehend. I want to spend the rest of my life and my energy exploring it depths.
As for who wrote the Bible, If I find any clues, I'll let you know.