The quotation “History is written by the victors” is often attributed to Winston Churchill. It’s probably a paraphrase of a sentiment which Churchill expressed in a speech before the House of Commons on Jan. 23, 1948, in which he quipped:
“For my part, I consider that it will be found much better by all parties to leave the past to history, especially as I propose to write that history myself.” He did indeed write that history, in his four volume “A History of the English-Speaking Peoples” (published 1956–1958).
When reading biblical texts we have to be mindful that many of them present ‘history’ from the perspectives of a victor. For example, we need to be aware that the histories of the kings of Israel and Judah were most likely written, or edited, by scribes or officials in the royal court of Judah. It’s hardly surprising then that the kings of Judah are generally judged to be much better than the kings of Israel. If we accept that in ancient Judah religion and politics were closely linked and that the scribes who were responsible for writing and keeping the court records may have also been priests (as they often were throughout the ancient world), then it’s also not surprising that these records have a distinctly theological tone. From the perspective of a scribe-priest in Judah the kings in Israel were bad kings because they had bad theology, and the best kings in Judah were the ones who listened to the priests and centralised worship at the Jerusalem Temple. Israel fell to the Assyrians before Judah fell to the Babylonians, and the only official records which survived from Israel were those which were incorporated in an edited form into the books compiled by the scribes in Judah. Hence we could say that Israel’s history was largely written or re-written by the ‘survivors’ in Judah, and presents a Judahite theological perspective.
Similarly, the only histories of king Saul and king David which have survived are those which were written or preserved by officials who served the kings descended from David. That they seem inclined to be more pro-David than pro-Saul is therefore hardly surprising. I choose my words carefully when I say “they seem inclined …” because they are not entirely anti-Saul and at times they are also critical of David. The books of Samuel and Kings are quite different in this respect from the book of Chronicles which seems to be unashamedly pro-David and pro-Solomon and in re-writing the earlier books it leaves out any material which portrays these kings in a bad light. Sometimes it is difficult, in fact, to determine if Samuel-Kings is pro-David or anti-David, pro-monarchy or anti-monarchy. The trend in Biblical scholarship is to think that rather than being written by a single author (who was once thought to be a single person styled ‘the Deuteronomistic historian’ or ‘the Deuteronomist’) Samuel-Kings was compiled from various sources and then went through a further process of editing, or redaction. I don’t pretend to be an expert on the redactional processes in writing Samuel, but here is a brief summary of where I think scholarship sits on the question at this stage: 
- Sources: Several parts of Samuel originally existed in some form as separate, independant documents. It is possible to detect differences in style between these sections and their surrounding material, which suggests they were written separately and then later incorporated into the larger body of work. (For example, two of the stand-alone documents which were incorporated into Samuel have been designated as “the Ark narrative” and “the succession narrative.”) These sources may have included material written by supporters of Saul, some material by supporters of David, and some by opponents of one or the other.
- Editors/Redactors: There are signs in Samuel that several redactors edited and composed material relating to the establishment of the monarchy, especially the dynasty of David. These editors/redactors would have drawn on the sources I mentioned above, perhaps reworked some of them, and then added new material to bring it all together as one coherent whole. Many scholars think different redactors worked on Samuel at different times during or after the exile (mid-exilic, late-exilic and post-exilic). Furthermore, as there was probably more than one editor/redactor working at different times, their motives and agendas may have been different. The fact that a later revision or redaction needed to be made suggests that circumstances and/or ideas had changed, which required the revision.
- Redactional ‘layers’: This editing process was undertaken at various times by various editors/redactors which has resulted in apparent contradictions (such as the two different stories about Goliath – in one he was killed by Elhanan, in the other he was killed by David). Scholars have detected the ‘fingerprints’ of more than one redactor, and it seems to me that while one source or redactor was pro-David and in favour of the monarchy, another was critical of David and opposed to monarchy in general or to dynastic monarchies in particular. There is a good case for arguing that the final redactor was strongly antimonarchic. From a modern perspective we may wonder why an editor/redactor would add material which contradicted earlier material without removing the earlier material. In other words, why would an editor allow two (or more) contradictory accounts or views to stand side-by-side when it would be easy to simply delete the material with which they disagreed and therefore present a harmonious account? It seems that this is precisely what the writer of Chronicles has done: he undoubtedly used Samuel-Kings as a source with the intention of producing a ‘revised version’, but while adding new material he also deleted or ignored some of the material in Samuel-Kings which didn’t suit his agenda (such as anything which cast David in a poor light, like the Bathsheba affair). So why didn’t the editors/redactors of Samuel do the same thing? We will never know what was in the minds of the editors, but one guess is they may have allowed contradictory material to stand out of respect for the alternative traditions. Just because you don’t agree with something you don’t have to attempt to expunge it from the record.
This is standard biblical scholarship. But I’d like to add something of my own. Allowing contradictory material to stand together could also, in fact, be a deliberate literary or rhetorical device. By allowing two views to stand together, the strength of your own view should be more obvious. The weaker position is ridiculed, fictionalised accounts become more evident, and the opposing view is therefore satirised. A few scholars in recent years have detected satire in the book of Samuel and I am currently working on a hypothesis that it may have been one redactor in particular who was responsible for this satire. I will write more about this as my research progresses. Going back to the David and Goliath story we can see why a satirist would allow two different accounts of the story to be merged together, and then ‘correct’ the whole story by mentioning later that it was actually Elhanan who killed Goliath. It suggests that the Elhanan story was re-worked by pro-David supporters to make David a hero, but the fact that there were two different versions of their story highlights the fictionalised nature of their legend. The satirist-editor, who was antimonarchic, allowed it to stand because it strengthened his argument that the pro-David party exaggerated or fabricated stories about their hero to use as propaganda, and that Israel after the exile would be better off without a dynastic monarchy.
So, in Churchillian fashion, the supporters of David re-worked the stories about Saul to present David as a hero and Saul as a villain. But then, much later, the opponents of a Davidic dynastic monarchy edited and reworked these accounts to make the Davidic kings responsible for Judah’s downfall, and thus in a new context the old heroes became the villains. Yet again, the priestly-Zadokite writer of Chronicles took Samuel-Kings and reworked it one more time to restore David and Solomon to heroes, no doubt to support their own legitimacy and their claim to represent the ‘traditional’ or ‘orthodox’ institutions. Without a monarchy after the exile the nation needed a new form of government, and who better to lead Israel than the priests appointed by David and Solomon, the Zadokites? It was time to re-write history again, but they couldn’t eradicate alternative ideas or the texts used by their opposition, and so Samuel-Kings and Chronicles both survived and preserved different versions of history. Interestingly, perhaps ironically, both versions eventually were ‘canonised’ and bound together in the one book we call the Bible.
Coming soon: Good king Saul
 For some expert opinions on the redactional layers in Samuel see Edenburg, Cynthia and Juha Pakkala eds. Is Samuel among the Deuteronomists? Current Views on the Place of Samuel in a Deuteronomistic History. Vol. 16 of Ancient Israel and its Literature. Atlanta: Society of Biblical Literature, 2013.