Ancient people did not write “history” as moderns generally understand the term. The origin of history-like writing is traditionally linked with Herodotus among the Greeks in the late fifth century BC. But even classical histories are quite different in conception and execution from modern views of of the purpose and meaning of history. Rather than writing history in books for publication and general reading, ancient societies generally practice communal commemoration. (Indeed, Herodotus “published” his History by reading it publicly the Olympic Games—a form of communal commemoration.) Shared historical beliefs and commemorations were one of the important things that bound ancient societies together. And as such, historical commemorations were intimately connected with religious beliefs and rituals. Several examples of these types of practices can be found in the Hebrew Bible (Deut. 31:11; Josh. 8:34; Neh. 8:8, 18, 9:3). The Hebrew root zkr describes this communal remembrance, memorial, or commemoration of past people and events. Commemoration was a communal act, where groups assembled to remember their ancestors, great past deeds and events, and God’s might acts. Commemoration could take the form of texts, poetry, song, dance, drama, architecture, art, ritual, etc. It is quite clear that such non-textual commemoration existed among ancient Israelites both before and during the period of the composition of the Bible. The literary form a document takes, or the sources from which it was composed, tells us precisely nothing about the historicity of the people and events commemorated.
Which finally brings us to the Documentary Hypothesis. The Documentary Hypothesis is a literary theory that at best can tell us about the physical composition of the Pentateuch in its final, and possibly penultimate form. Source criticism can tell us nothing about historicity, either for or against. A source written centuries after Moses may contain accurate information about Moses, derived either from oral tradition, or lost written texts. On the other hand, sources written by eyewitnesses at the time of the events described are often filled with confusion, misunderstanding, bombast, inaccuracy and lies. The particular (and in many ways accidental) literary form in which ancient commemoration occurs has nothing to do with the historicity of the events remembered. Poetry can be accurate; prose can be imaginary. Commemoration can remember authentic historical events or completely imaginary legends. Of course this creates potential epistemological problems for modern historians trying to “know” the past.
From the LDS perspective the issue of historicity raises the interesting question of whether God can reveal accurate information about the historicity of past people, events, and texts. Given the prophetic claims of Joseph Smith, I would hope that all faithful LDS would affirm that it is at least possible God can reveal true and accurate information about the past. (And, if he can, one wonders why God would instead choose to reveal false or misleading things about the past to a prophet.) If God can reveal true and accurate things about the past, then it would seem possible that a text might date literarily from, say, the sixth century BC, and yet contain true and accurate revealed information about Moses. If so, then the literary date of a biblical text does not necessarily tell us anything about the historicity of the information that text contains. Only when we reject the possibility that God can reveal true and accurate information about the past—an assumption shared by all secular scholars—do such issues questions become problematic.