For me to talk about such topic is quite weird but I am a freethinker and I will say what I think.
In the 1930's a person named Kaufmann released a book named the Religion of Israel. It is a very lengthy book that is quite controversial and sometimes over rated in its criticism of the religion of Israel.
According to Kaufmann, monotheism cannot be a lone product of evolution in polytheism but rather of a revolution of it.
Arguing against the Wellhausenian school of Bible criticism, Kaufmann attempted to demonstrate that Israelite Monotheism was an original creation and popular faith without any roots in paganism, crystallizing in the time of Moses. Thus he challenged the Wellhausenian view that it was the Prophets who were the true creators of ethical monotheism and that the Torah was a mere reflection of their teachings. He pointed out that the influence of the prophets in their own time was not great and that in fact prophesy was a stage that followed from and grew out of the teachings of the Torah, the historical and moral presuppositions of the prophets being those of the popular religion. In this connection, and in the context of the documentary theory of Bible criticism, he also argued that the so-called Priestly Code (P), rather than being a post-exilic composition, as claimed by Wellhausen, antedated Deuteronomy (D), the "book of the law" discovered in the Temple by the High Priest Hilkiah (II Kings 22:8; II Chr. 34:14) in the time of Josiah (622 BCE). Kaufmann also contended that the Israelite conquest of Canaan, reflected accurately in the Book of Joshua, was the product of a national plan carried out by a confederation of tribes acting in unison rather than a gradual process embracing a number of unrelated stages.Source.