Somehow I jumped from question 3 to 5. Here’s 4.
“Why were the books of the Bible written? I know that some of them are letters so I get that, but what of the ones that are written as novels and accounts of Jesus life and the stories of the Old Testament? The authors didn’t know their work would go into the Bible so why did they record it? Was it like a diary? A ledger? Letters?”
I think one of the super important things about the Bible is something you’ve absolutely nailed in your question — that its a collection of books. Each book has a different purpose, is a different genre, each is written at a different time in the unfolding of God’s story, and each is written in a different way (so, some books are histories that accumulate over time via different people who compile them, some are autobiographical, some are recordings of sermons or messages brought to God’s people by leaders, prophets, and later, Apostles).
Genesis-Deuteronomy = the ‘Law’/legal code of Israel, but it’s not just their law it’s their history — the reason to keep the law. It tells the story of Israel being created out of all the other nations (and connected to all the other nations, and the story of all the other nations being connected to God from Adam, and how Israel was meant to ‘bless them’ (from Genesis chapter 12 — this might help answer your later question, Israel was meant to follow in Adam’s footsteps, being God’s representatives/making him known to all the nations, and all the nations were meant to keep their connection to the God who made them through Israel, but they walked away. That’s the story the earliest books of the Bible tells — of our shared humanity, but Israel’s role in God’s plans, and how they’re to carry them out by being different.
Those books are a mix of oral history and autobiography/sermons written by Moses, except they go a bit after his death, and there are times where you can see people adding little historical notes like “and this is still there to this day” so that you know they were ‘edited’ or at least kept current so that readers knew their connection to the story in later generations.
Joshua-2 Chronicles records Israel’s history as a nation, from the time they settle in the land that is now a pretty contested part of the middle east, to the time they’re taken into exile. These are written by many many people, probably as official court historians/record keepers. They’re largely narrative based.
Then there’s the wisdom literature — Job, Proverbs, Psalms, Song of Songs, Ecclesiastes — these are like many other ancient forms of wisdom literature that explore the big questions about life, the universe, and everything. They are an interesting mix — especially Psalms and Proverbs — Proverbs has some Egyptian wisdom, some Jewish thought, and shows how Israel should be relating to the world (including the wisdom of the nations), by starting their search for wisdom with understanding how incomprehensibly big God is (so the Proverbs talk about ‘the fear of the Lord’).
The rest of the Old Testament are ‘the prophets’ accounts of the preaching/teaching of different people who spoke to Israel about how they were going wrong by wandering away from God and turning to idols. These guys either wrote stuff down (and sometimes describe themselves as writing things down), or their messages were recorded.
The prophets and the Psalms reflect backwards on the history, and look forward to Israel living the way they were meant to, not turning to idols, for the sake of themselves, the nations, and God’s plan/story which was heading towards Jesus.
I suspect they recorded their messages because they were part of a culture that recorded its history (from the time of Moses), and they saw themselves standing in this tradition of God revealing himself, in terms of what type of text their recordings were, they read like they could be a bit of a diary, or letters to their school of followers, and at times a collection of sermons/speeches they were giving. Some of them record history — like speeches from the national leaders/spokespeople they’re interacting with. I think there are two reasons they might have written things down, depending on how much they knew they were speaking directly for God, and so writing ‘the Bible’ and how much they knew they were saying important things to call Israel back to what they knew to be true. So:
1. To record their words as God’s word, or,
2. To have a record of their words as important messages that would be held up against what happened to Israel in order to see how accurate they were as prophets. Prophecy has always, in some sense, been tested by its accuracy, and the reason these ones lasted is that they proved accurate both in terms of Israel’s exile, and, for Christians, the coming of Jesus.
In the New Testament, there’s Gospels — which are biographies/histories of Jesus with a particular theological agenda and an audience the writer is trying to persuade about Jesus. So. Mark is written to a Roman audience, it seems, and tends to emphasise details that Romans would find significant, Matthew is written to a largely Jewish audience, Luke is written, it seems, to a Greek/Roman/Jewish mixed bag and its largely an attempt to give a robust history of Jesus and the Church (centered on Paul’s missions), because Luke’s sequel, Acts, was probably part of the same volume originally but split over two scrolls. John is written a little later than the other three Gospels, and seems to answer a bunch of big theological questions about who God is, who Jesus was, etc, to help the early church appreciate the connection with the Old Testament, and potentially to answer some things people were teaching about Jesus that weren’t consistent with the other Gospels.
Then the rest of the New Testament is letters to churches or people. They’re a bit like the prophets in that they reflect on who God is, and how he goes about saving, and deal with figuring out what beliefs this creates in terms of different situations and tendencies, and how we’re to live in response.
There are a couple of books that are often treated as tricky (and they are) which are harder to categorise because they use an apocalyptic genre so are full of symbolism — Daniel and Revelation. I tend to think Daniel is much like the other prophets in that it is meant to teach God’s people about real power by assessing a situation where they are under the power of an oppressor, and Revelation is actually primarily a letter, so it has to be addressing real, specific, concerns for the people receiving it in order to be useful (and so, circulated), and it also has to make sense to them. We lose the meaning of these books if we try to decode the symbolism to make it primarily about distant future events for the recipients or current events for us.
What’s cool about the Bible is that we don’t entirely have to figure out this question apart from God’s answer, which we find when Jesus uses the Bible in all its diversity, to point people to himself as the climax of the story. He’s talking to a couple of his followers before they realise it’s him, after he’s been raised from the dead, in the midst of their disappointment because they don’t think a crucified guy can possibly come from God.
“How foolish you are, and how slow to believe all that the prophets have spoken! Did not the Messiah have to suffer these things and then enter his glory?” And beginning with Moses and all the Prophets, he explained to them what was said in all the Scriptures concerning himself.
He said to them, “This is what I told you while I was still with you: Everything must be fulfilled that is written about me in the Law of Moses, the Prophets and the Psalms.”
Then he opened their minds so they could understand the Scriptures. He told them,“This is what is written: The Messiah will suffer and rise from the dead on the third day, and repentance for the forgiveness of sins will be preached in his name to all nations,beginning at Jerusalem. You are witnesses of these things. I am going to send you what my Father has promised; but stay in the city until you have been clothed with power from on high.” — Luke 24:25-27, 44-49
So despite all this diversity, and all the specific situations that were being addressed (and are still addressed) in terms of who we are and how we go about life in God’s world, and what that means for our relationship with God, the Bible from start to finish is actually about God, not us. It tells his story, about his love for people as it is ultimately revealed in his chosen king. It’s the story of God coming to dwell with his people — regaining the paradise lost in the first chapter, first in Jesus himself, and then when this promise Jesus makes is fulfilled as God’s Spirit, his life-giving breath comes to live in people again.