What came before it? How did people come up with the idea of one god and all the stories in The Bible and such?
I listened to 3 years of courses held by Thomas Römer at the College de France, available (in french) here: http://www.college-de-france.fr/site/thomas-romer/#course
This question is really huge and has no easy and clear answer. But you need to take into consideration that jewish theology made centuries to be made, as well as the stories told in it, they evolved with their time. That's why some events are told twice, like the two different birds sent by Noah, they are traces of two different narratives that were combined by a later copist who tried to make a unified version. In addition most of the myth in the bible came from mesopotamian prototype and it as even been argued that most of them were transformed into jewish stories only during the exile in Babylon. To answer your question more specifically, Thomas Römer doesn't really make a difference between YHWH and the other semitic gods around it. According to him this god had all the caracteristics of a Thunder god, and one of his attribute in the bull. That's why he think that the translation of Hieronymus of Moses wearing horns when he return to the people from the Sinai mountain is true. He had horns because he spoke in the name of god and had parts of his power. But later traditions found it odd has the link between YHWH and horns was not recognised. The god of the jews was not alone either. He had an Ashera, a female counterpart worshiped with him. In addition the prophetic books are more explanations of the presents written in the past than anything else. One exemple I know very well is the book of Daniel. The narration take place in the VIth centrury at Babylon. And explain through a dream that a series of kingdoms weaker and weaker will come after the Babylonian one. Until the last one will be smashed and the kingdom of God rule eternally. Different count of the kingdoms were made through history (the prophecy is still used by gehovah witnesses), but it was surely made to announce the end of the persecution of Antiochos IV who tried to hellenize the jews by force and started the Maccabean revolt. Moreover the book of the Maccabeans is the only trustable history book in the bible (the protestants removed it, if I remember correctly it was precisely because they were not really theological)