One cannot understand the Hebrew Bible and its point of view without understanding Mesopotamia, under the shadow of which the Hebrews began telling their stories. Semitic kingdoms, city-states, and empires grew and fell before the Hebrews even contemplated putting their stories to writing, or even existed at all. So it's no wonder that Genesis says the world was created in southern Mesopotamia, near a confluence of the Euphrates, the Tigris, and other rivers, and that the first Patriarch, Abraham, originates from there as well.
Mesopotamian powers dominated the Ancient Near East for about the same time as the time that has passed since their fall. A combination of prime real estate, with the best agriculture and water highways, and war-like proclivities meant that someone was fighting someone else for control of someplace, pretty much continuously from pre-history all the way to Cyrus the Great.
The trigger that led so many people to concentrate in one place may have been religious funerary rituals in the confluence of some of the area's sacred rivers.
While the Levant was going in and out of an urbanizing process in the 2000s-1000s BCE, there is reason to believe southern Mesopotamia started to see the rise of cities before 4000 BCE.
It was a never-before-seen societal unit, with strangers from different lands either living in the city or around it, making it a political, economic, social, and military force like the world has never seen before. That system was quickly replicated upstream, along the Euphrates and Tigris: first Uruk, then Ur, Akkad, Nineveh, Nimrud, Lagash, Babylon, and more.
At its height, up to 50,000 people lived in Uruk around 3000 BCE.
Developments in irrigation, metallurgy, wheels and horse domestication all joined to revolutionize the way human societies are organized, replacing cooperation and relative equality, with a Petrie dish for hierarchy and patriarchy.
The social pyramid slowly radicalized and had to come up with social and religious reasoning to underpin the new and harsher social structure. High priests and later generals became exceedingly powerful, rich, and divine, while the masses' labor was replaced by a narrow caste of professionals: soldiers, craftsmen, scribes, and clergy.
Up to that point, a central part of social organizing relied on the collaboration of a large number of people carrying goods or tending to crops, with a horse and cart you only need a few specialists (craftsmen and riders) to do a more efficient job that hundreds of people could ever do before this ancient "automation process". The plebs were thus relegated to menial labor, which meant they lost political power. They became interchangeable and compliant.
In came a new social invention: taxes.
These new societal concepts were enshrined into law, myth, and religion and from there spread to the entire region and beyond.
The temple complexes know as ziggurat were a major architectural accomplishment and distinctive feature of Sumerian cities, from which it spread throughout Mesopotamia, and retained their prominence well into the later periods when Semitic people took over the area.
Since the city was the prevalent social structure, it made sense that gods were specific to each city. These cities were part of one cultural and political sphere, which meant that inevitably their deities were connected and overlapped.
The belief was that the city deity resided on top of the ziggurat, and the access was restricted to high priests alone, who held a monopoly on communication with the gods, which only exacerbated the extreme social hierarchy. For their work, they were showered with money, gifts, and harvest, which slowly turned them into religious-economic ventures that bought and sold goods, on top of their religious services to rulers and common people alike.
Cities and fierce hierarchy incentivized a certain kind of humans - ambitious men - to go all-in in a new game of high-stakes politics and geopolitics. Men of war supplanted male priests, accumulating unheard wealth and power, spreading their social ideology throughout the region. Slowly, they came to be depicted as gods, enacting laws and showing mercy to the people with periodical debt cancellation.
In the first half of the first millennium BCE, when the Hebrews looked back to their imagined past and put pen to paper, they could not see beyond big cities and the Great Men that ruled them. So, the bible says that after the banishment from the Garden of Eden, cities were created, wiped out by the flood, and then built again as the prototypical and most ancient social structure in history. The Mesopotamian propaganda had achieved incredible success - they erased their revolutionary past and came to be regarded as the organic and primal method of structuring society. In fact, the Bible explained why not all humans live in cities - divine intervention was needed in the Tower of Babel story to force them to disperse.
Similarly, the Hebrews needed a Great Man to tell their story, according to the social and cultural conventions of the time. They have Sargon of Akkad, Shamshi-Hadad, or Hammurabi; we have Abraham, the wanderer.
The very top class was made of ruthless men by necessity, as those who rose to the top. Once there, they amassed property, including other humans, be they, slaves or women. This system was reinforced ideologically through decrees and religious texts and shaped how our society is still built today.
On top of the ever-constant Mesopotamian perspective of history that the Hebrews adopted into their epic book, there are several clear "inspirations" that the Bible takes from Sumeric, Akkadian, and Babylonian myths, similar to how these latter Mesopotamian cultures constantly adopted cultural and religious ideas from each other.
Famously, the story of Noah and the flood is very similar to the tale of Utnapishtim in the epics of Gilgamesh, but the story of Moses is also surprisingly (or unsurprisingly, if you accept the Mesopotamian influence "hypothesis") extremely similar to the lore surrounding Hammurabi's rise to power.