Allegorical stories are used all the time to imply real things. Fairy tales was used like that, and still is.
Consider for Christmas what are we told? Go to bed early, if you hear Santa don’t go look. Just keep your eyes closed and sleep until morning. Let’s leave milk and cookies out for him.
It’s a completely fictional tale that we tell kids. But that mythology is partly based on some real things. Like the Saint Nicholas. ( Or however his name was spelled).
It’s also full of hyperbolic and mythological aspects. Singing reindeer, one with a glowing nose, elves, a living snowman, flying sled, a man who can come up and down chimneys no matter how small ( and if you are poorer and live in a trailer he can come through the cracks of window units, under the door , and even supposedly bathroom vents lol). He had a list and he checks it. We’re you good or naughty.
Then there is the real life applications of the tale. Parents work all year just like elfs so they can get you toys. It’s a fairly common holiday in many nations and so it happens all over the world. I’m not sure if it’s billions or just millions and millions but parents all over the world on Christmas Eve put out presents for their kids. So Santa is hitting all over. They want you to sleep and not check on the sounds so that you don’t catch them.
People from every race, from Asia , america, Russia, Europe, and even in Africa and all over , and people who are poor to those who are rich, religious to atheist, from living in big cities to in the deep country, share these stories.
Fictional tales can use real people and events and add hyperbolic fantasy to it and still use that story to explain something real. Jesus did it a lot with parables.
There is no real reason to think God would not convey a truth in a similar way.
I have no idea who actually wrote genesis. Was it moses or was it someone we don’t even know from the 5-6thbc. I don’t know. But there is definitely a chance that it was wrote after the Jews were practicing the sabbath. So genesis , though inspired by God, was conveyed through the worldview of the author. 7 sets a pattern for the rest of the Bible same for 10, 14,40, and 100.
It sets the pattern for a tree being tied to eternal life.
The tree of Life.
The trees used for the ark.
The tree jesus was crucified on.
The tree we are grafted into.
It sets the example of something bearing the consequences of guilty people who killed the innocent.
The mark saved Cain from the consequences of killing Abel.
The animal sacrifices saved Hebrews from their sins.
The snake statue on a stick or whatever it was I can’t recall healed the sick.
Noah was permitted to bring on his family who probably also sinned.
Jesus died for us.
It sets the example of humans rejecting Gods will for their own because it looked good to them.
Adam and Eve saw that the fruit looked good.
Jospeh was seen to look God from the other man’s wife.
A king Saul looked good to the tribe who wanted a king instead of a God.
Abraham and Sarah saw that Hagar looked good.
Judas saw thst the silver looked good.
The waters being connected to salvation.
Dry land buried beneath water rose up.
The ark survived the water while the world was buried in it.
The buried land was revealed as the Red Sea parted.
Those who believed are baptized into a Christ for the forgiveness of sins and to receive the holy spriest in baptism.
It does a great job setting to patterns. It does all of that despite being a very hyperbolic ahistorical tale.