Dear Stephanie (not my friend’s real name),
Sorry for the late response.
I’m so glad you are asking about the “difficulty” of the Bible containing lots of material which seems to be influenced by “pagan” cultures. I feel like I’ve spent two decades trying to get ppl to ask questions like this, but most of the time ppl are just kind of like half-dead zombies with glazed over eyes!
Look, there are two things I want to say to you.
1. Your assumption, the assumption, that true biblical revelation must be free of cultural influence is not only wrong, but it is part of why we modern evangelicals are so fucked up.
2. When the Bible “retells the same stories,” it always does so “with a twist.” It tells the same stories that its ANE (ANE=”ancient near eastern”) neighbors told … but always with a “special twist.”
So, two points: 1) stupid assumptions, and 2) twist.
So here goes on point #1. Why on earth wd we think that, for example, if the creation story (better: creation stories, since there are 2 in Genesis, and others all throughout the OT) is “true,” it must be totally unique? Was Jesus totally “unique?” No! He spoke Aramaic, just like his neighbors. He was influenced by all sort of cultural assumptions, “ideologies” (to use your term), habits, mores, etc. Jesus and the Bible did not “pop out of heaven” as if they were totally non-inculturated. In fact, the God of the Bible has never operated that way: the God of the Bible always works through ordinary means, both natural (eg, evolution) and cultural.
In fact, it is the Muslim faith (don’t get me wrong: I like Islam a lot!!) that sees Holy Scripture as unmediated. Literally, the Koran was supposedly dictated directly to the Prophet Mohammed. Downloaded into his brain, like that scene in the Matrix where Neo “learns” jiu jitzu. Not so with the Christian Bible. It is always both the word of God and the word of man. It is both mysteriously divinely inspired, and the product of human language, human imagination, human creativity, human research (see Luke 1:1-4). The Bible is ALWAYS MEDIATED, always enculturated, never direct and unmediated, as if it fell out of heaven, straight from God.
In this, it is like Jesus: fully God, yes, but also fully human. (This it he point of Peter Enns’ book Incarnation and Inspiration, which I can lend you.)
So if our Bible is fully human, why would be expect it to be unaffected by cultural influences?
A much better approach is that of CS Lewis. He thought that if the Noah story has a lot of material in common with the Epic of Gilgamesh, then, cool! That strengthens, not weakens, the likelihood that it is true!
Point 2. The Bible tells the same stories with a twist.
The point of the twist is always to “further the agenda” (often a political agenda!) of portraying Yahweh as the “top god.” That is, the OT stories (the creation, the flood, the Exodus, the Torah) are tendentious. They have a tendenz; they have an agenda. They are basically saying to the Babylonions: “Your god Marduk is a joke. Check out our god, Yahweh. He does not create in the same low-grade way that your god does: our God creates by speaking! Our God Yahweh is the one true God, the Maker of Heaven & Earth!” (On Marduk & Enuma Elish, see here: https://en.wikipedia.org/wiki/
Same with the Torah of Moses. I think that the “twist” has to do with prostitution, which uniquely in Israel was outlawed, such that men were legally forbidden to treat unmarried young girls / women as mere tools or objects of pleasure. At the end of the day this has to do with marriage as an icon of the love between Yahweh & Israel. Very different from Babylon & other neighbors, where prostitution was legally regulated, and young girls were the property of their owners.
But, yes, the Torah of Moses is very similar to the Code of Hammurabi. Praise God that we was at work through that code (broken though it was), just as He was at work in the thought of pre-Christian philosophers like Plato & Aristotle before the advent of the Divine Logos, “in the fullness of time.” (Without their thought, we’d have no Doctrine of the Trinity!)
Hope this helps! Keep asking questions, and please hang out with fellow questioners & travelers!