The "grain of truth" in the stories is thus: the Hebrew-speaking nations (both Israel and Judah) developed from, and separated from, indigenous Canaanite tribes. Israel developed in Iron Age II, during the 9th century BCE, and became a local power, competing with Egypt for economic and political power--not very successfully, but independent enough to survive as a culture and a nation. Judah developed somewhat later (emerging in the 9th century BCE), and enjoyed a relatively brief period as a semi-client state of Assyria, then of Babylon.
Many of the pericopes of the Exodus accounts come from Judah, and reflect the tension between Judah's economic and political dependence upon its northern neighbors and the sometimes-cold, sometimes hot relationship with Egypt, and to some extent with Israel. Indeed, most of the law narratives deal with Judahic concerns, not Israelite. Recent finds of both casually hunted and farm-raised pork in Israel sites demonstrate the prohibition against pork, for instance, was formalized first in Judah, with only limited acceptance in Israel. (The issue of abstinence from pork was not the sole province of Judah, as there are also several Aramaean sites with a complete absence of pork bones.)
Israel was destroyed in 722, its population deported and assimilated within Assyria. Judah attained regional dominance with the destruction of Israel, but wrebelled against the Neo-Babylonian empire and was destroyed in 586. However, unlike Israel, Judah retained cultural cohesiveness during the Babylonian captivity, and was allowed to return shortly after the Persians conquered the Neo-Babylonian empire.