Historically, from a purely academic perspective, Yahweh was one of a pantheon of Canaanite gods, the son of the Canaanite supreme god EL. Some research indicates that the pantheon and origin myth were borrowed in part from neighboring Babylonian culture.
Baal was a rival god, also a god of storms and symbolized by a bull, similar to Yahweh. As
@Ohana correctly connects, desert people need a rain god. Drought and war were the two big culture-ending threats to them. And bulls (cattle in general) would have been how they stored wealth. These same dynamics exist on earth today.
After centuries of Baal worship, cults from semi-nomadic herders eventually codified, morphed into monotheists, and afterwards ended up eclipsing Baal worshipers for local power. So the god of the victors becmes the god everyone has to follow. Baal was the brother of Yahweh, and now is the blasphemer. Just like how Christians displaced other gods when they rolled into town.
Yahweh ended up becoming just the generic "El." The confusion there is that, similar to English, "El" in ancient Hebrew simply means the pronoun/title "god" and the proper name God. IsraEL = People of God, El Shaddai = God the Almighty, etc. So Yahweh as THE singular god just became...God. Why can't you say God's real name? Because that's the only god now, we don't want to remember that Yahweh had a specific name because then it opens questions about why, even in the Bible, Yahweh.
Personally, this is one of those "Tale as old as time in the ancient world" stories. The Romans eclipsed the Greeks who eclipsed the Egyptians. At the time, oral traditions and priests were all there was to keep the stories going, which makes it easy for other neighboring tales that sound good to get mixed in to the overall corpus of the pantheon. I think if you coupld go back in time and hear a few Canannite herders getting an earful from a priest in 2,467 BCE, it would sound closer to most other polytheistic stories than anything resembling post-Biblical understandings of what ether god is or was.