The consensus of biblical archaeologists is that the Hebrew Bible contains much history but its “overlaid with legendary and even fantastic materials that the modern reader may enjoy as ‘story’ but which can scarcely be taken seriously as history.”
William G. Dever, commonly referred to as “America’s leading archaeologist of Israelite history” writes: “While the Hebrew Bible in its present, heavily edited form cannot be taken at face value as history in the modern sense, it nevertheless contains much history.
Let me begin by clarifying which books of the Hebrew Bible I think can be utilized by the would-be historian, whether textual scholar or archaeologist. With most scholars, I would exclude much of the Pentateuch, specifically the books of Genesis, Exodus, Leviticus, and Numbers. These materials obviously constitute a sort of “pre-history” that has been attached to the main epic of ancient Israel by late editors… As for Leviticus and Numbers, these are clearly additions to the “pre-history” by very late Priestly editorial hands, preoccupied with notions of ritual purity, themes of the “promised land,” and other literary motifs…
All this may be distilled from long oral traditions, and I suspect that some of the stories – such as parts of the Patriarchal narratives – may once have had a real historical setting. These traditions, however, are overlaid with legendary and even fantastic materials that the modern reader may enjoy as “story” but which can scarcely be taken seriously as history.”
(William G. Dever “What Did the Biblical Writers Know & When Did They Know It? – What Archaeology Can Tell Us About the Reality of Ancient Israel” 2001 – William B. Eerdmans Publishing )