Scholars like John Walton and Peter Enns stress the real or imagined parallels between the Bible and other ancient Near Eastern cultures. In that regard, it's useful to contrast their position this statement by Nahum Sarna. Although he is, himself, a fairly liberal Jew, his observation is a useful corrective:
…whereas all the diverse literary genres of the Bible are to be found in the neighboring cultures, the reverse is not the case, and the omissions are highly instructive. The huge literature belonging to the worlds of astrology and magic omens, divination, and the like, and the considerable body of mythical texts, have no counterpart in the Hebrew scriptures (although the texts preserve evidence of these customs) because they are incompatible with Israel's fundamental monotheism. Moreover, it is apparent that what was drawn from the common Near Eastern stock was thoroughly refined and reshaped to bring it into conformity with the national religious ideology. Encyclopedia of Religion (Macmillan Reference, 2nd ed., 2005), 2:884b.