Why would our God choose to inspire humans to write the texts that make up the Bible?
The short answer has to be, So that other humans will read these texts and be encouraged to behave in a particular way (in this post, behaving includes not only one’s external actions but also one’s internal motives and belief). Accordingly, the texts need to teach right from wrong, including right belief and wrong belief, and discuss the rewards for the former and punishments for the latter. They can also provide us guidance on how to mold our behavior. I suppose that there might be other reasons for our God to inspire a text to be written, but this seems to me to be the obvious one, and indeed no others come to mind.
Now, if you were our God, what sort of texts would you inspire to get humans to behave in a particular way?
Well, the most straightforward text like this would be an explicit list of rules, and sure enough we have plenty of that, most obviously in the Torah. The Gospels, of course, provide us with the teachings of the Son of God, detailing how we are to relate to God and treat one another.
The book of Proverbs is slightly less an explicit list of rules, but it’s pretty close. The prophets, major and minor, were certainly telling people how to act, often quoting God Himself, and having these injunctions written down makes sense because other people later on can apply them to their own, similar situations. Note that both Proverbs and the prophets frequently include not only what we are supposed to do, but what will happen if we don’t. The New Testament letters, telling churches sometimes and individuals other times what they should do and believe, are likewise applicable to later churches and individuals in the behavior they encourage.
The other Wisdom books, in addition to Proverbs, are logical additions. God wants us to pray to Him — among other things, doing so helps give us the strength and wisdom to do what we know we should do but might find it difficult to do — so giving us guidance on how to pray also makes sense, and that’s what the Psalms provide. The book of Job does that, too, and also gives us information about what sort of entity our God is (as does, for example, the first part of Genesis), which incentivizes obedience. Ecclesiastes also instructs us about the human condition and how we are to live and follow God. The most important human relationship is marriage, and the Song of Songs provides a celebration of heterosexual love between a married couple, teaching that it is a divine gift and to be treasured.
But what about history, the recounting of human events, which makes up such a big chunk of the Bible? Much of the history we read in the Bible is instructive regarding God’s wishes for our behavior, even if most human history is not. If indeed the Jews were God’s chosen people — with God speaking to them and working through them — then their history in the Old Testament and how God interacted with them would be instructive; the Son of God’s activities on earth (the Gospels again) and the Acts of his Apostles would be, too. The events recounted provide role models and cautionary tales, for example, not only telling us what God wants but providing some tips on how to overcome obstructions to His will.
There’s another purpose that history serves. It’s not enough just to enunciate the rules and the costs and benefits of following them: You also have to persuade people that there really is a God behind them. Now, the history in the Bible is not self-authenticating, but it is evidence, and if true then of course it does establish the sort of God who might have these rules and the power to enforce them, who has created people and wants them to live in a way that honors Him and show love for one another. I should say that occasionally there are passages of apologetics proper in the Bible — that is, that lay out explicitly the evidence for God’s existence — but in general the argument is implicit in the history that is laid out.
That leaves Revelation, the first chapters of which are similar to other New Testament letters that instructed churches on right behavior. As for the account that then follows of the world’s last days, that’s future history which provides some instruction on right behavior but, more important, reassures the righteous and warns the unrighteous about what lies ahead for them. Again, doing and believing what God wants is encouraged.
Anything else you’d want for people to write down, if you were our God? And is there a lot in the Bible that is irrelevant to the hypothesized aim of telling people how to act, and what to believe, and encouraging them to do so? I think the answer to both questions is, No. Rather remarkable, wouldn’t you say? And it all makes sense.