No religion was ever created from scratch; each and every belief system that has ever existed was based on or modeled after one or more other belief systems that predated it. Islam, being the last major monotheistic religion to appear, was especially lucky to have 2 older and widespread monotheistic religions, Judaism and Christianity, as well as many local polytheistic religions to borrow from. And borrow it did.
Episode #45 of the BBC’s podcast series A History of the World in 100 Objects was about an approximately 1700-year old bronze hand from today’s Yemen on the Arabian Peninsula. The inscription on the hand indicates that it was an offering to a local god named Ta'lab Riyam. We learn that during the time period when this object was made Yemen was a wealthy region thanks to production and sale of frankincense and myrrh. Subsequently, however, the local economy collapsed and the pagan gods were replaced by Islam. Not all was lost, however.
In the podcast, historian Philip Jenkins of Pennsylvania State University explains the contributions of the Arabian pagan religions to the subsequent rise of Islam:
I've suggested that religions die, but, as when people die, perhaps they leave ghosts - and you can see across the Middle East many ghosts, many survivals of older religions, in the newly successful religions. So as you look at Islam, for example, you see many, many survivals from Christianity and Judaism. The Qur'an is absolutely littered with stories which make no sense, except in terms of what the Christians and Jews of that time would have understood, the sacred stories…Then, as Islam spreads, it carries on drawing new kinds of pattern in from older religions, and evokes new ghosts.