What I want to do is take it a step further and say as follows: All the world had gods. It was unheard of not to believe in and worship a god. And so the Torah effectively sublimates the drive to believe in gods by packaging its own narratives and commands in God-language. Instead of going from many gods to none, which would be too big a jump, at least we can take it down to one mega-god, and a less corporeal one.
To be clear, I don't believe that this was the actual intent of the Torah. Just like I don't agree with the Rambam that the Torah viewed sacrifices as a concession, I don't think that the Torah viewed Hashem as a concession either. I think it's fairly clear that both God and sacrifices are taken for granted in the Torah as being the optimal belief and practice. However, just as the Rambam wants to make sense of the Torah in retrospect as being a step in the right direction, implying what the optimal state would be - a "clean" worship of God without sacrifices, I'd like to do that as well, and say that the Torah constitutes a stepping stone toward a more optimal state - where we act in accordance with the highest standards of personal/societal conduct, while "clean" of any god-worship whatsoever.
My apologies to the Rambam if he'd be upset at my appropriating his words, but since he already says something very close to what I want to say, I'd like to take part of Moreh Nevuchim 3:32 and "tweak" it to illustrate my point.
(The crossed out/greyed out text is the original wording, and the bold text is my emendation.)
When [a mammal] is born it is extremely tender, and cannot be fed with dry food. Therefore breasts were provided which yield milk, and the young can be fed with moist food which corresponds to the condition of the limbs of the animal, until the latter have gradually become dry and hard. Many precepts in our Torah pertaining to a supposed "God" are the result of a similar course adopted by(The original translation by M. Friedlander, Ph.D., 1904, can be found here.)the same Supreme Beingthe Torah. It is, namely, impossible to go suddenly from one extreme to the other: it is therefore according to the nature of man impossible for him suddenly to discontinue everything to which he has been accustomed. ...
But the custom which was in those days general among all men, and the general mode ofworshipbelief in which the Israelites were brought up, consisted in the worship of gods, for instance sacrificing animals in those temples which contained certainimagesgods, to bow down to thoseimagesgods, and to burn incense before them. Religious and ascetic persons were in those days the persons that were devoted to the so-called "divine" service in the temples erectedto the starsto various gods, as has been explained by us. It was in accordance with the wisdom and plan ofGodthe Torah, as displayed in the whole Creation [as in the example above of mammals], thatHeit did not command us to give up and to discontinue all these manners ofservicebelief; for to obey such a godless commandment it would have been contrary to the nature of man, who generally cleaves to that to which he is used. ...
For this reasonGodthe Torah allowed these kinds ofservicebeliefs to continue.HeIt transferred toHis service"the one god" that which had formerly served as a worship ofcreated beingsmany gods, and of things likewise imaginary and unreal, and commanded us toserve Himkeep the Torah in the same manner; viz., to build unto Him a temple." ...
By thisDivineplan it was effected that the traces of idolatry, i.e. god-worship in general, were on their way toward being blotted out, and the truly great principle of ourfaithTorah,the Existence and Unity of Godloving one's neighbor as oneself, was firmly established. This result was thus obtained without deterring or confusing the minds of the people by the abolition of theservicebeliefs to which they were accustomed and which alone was familiar to them.
I know that you will at first thought reject this idea and find it strange: you will put the following question to me in your heart: How can we suppose that theDivineGod-oriented commandments, prohibitions, and important acts, which are fully explained, and for which certain seasons are fixed, should not have been commanded for their own sake (i.e. out of the sincere belief in God and desire to worship Him), but only for the sake of some other thing (i.e. upright behavior and loving one's neighbor): as iftheysuch beliefs were only the means whichHethe Torah employed forHisits primary object? What preventedHimthe Torah from makingHisits primary object a direct commandment to us, i.e. "You shall be a holy society, and without the false belief in a god", and to give us the capacity of obeying it? Those precepts and beliefs which in your opinion are only the means and not the object would then have been unnecessary.
Hear my answer, which will cure your heart of this disease and will show you the truth of that which I have pointed out to you. There occurs in the Torah a passage which contains exactly the same idea; it is the following: "God led them not through the way of the land of the Philistines, although that was near; for God said, Lest peradventure the people reconsider when they see war, and they return to Egypt; but God led the people about, through the way of the wilderness of the Red Sea," etc. (Exod. xiii. 17). Here "God" (quotes added) is described as having led the people about, away from the direct road which He originally intended, because He feared they might meet on that way with hardships too great for their ordinary strength; He took them by another road in order to obtain thereby His original object.
In the same mannerGodthe Torah refrained from prescribing what the people by their natural disposition would be incapable of obeying, and gave the above-mentioned God-oriented commandments and beliefs as a means of securingHisits chief object, viz., to spreada knowledge of Himthe principles of justice for the oppressed, compassion to the stranger, and other laws which pertain to the betterment of the individual and society, andto cause them toin the hopes that they would eventually reject idolatry, i.e. any worship of a god or gods. It is contrary to man's nature that he should suddenly abandon all the different kinds of Divine service and the different customs and beliefs in which he has been brought up, and which have been so general, that they were considered as a matter of course. It would be just as if a person trained to work as a slave with mortar and bricks, or similar things, should interrupt his work, clean his hands, and at once fight with real giants. It was the result ofGod'sthe Torah's wisdom that the Israelites were led about in the wilderness of erroneous belief in a god till they acquired the courage to let go of that belief and abide by the principles of the Torah for their own sake. ...
In the same way,theall portions of the Torah under discussion whereby a "god" is referenced, either as Commander, as a character in the narrative, or as an object of worship, is the result ofdivinethe Torah's wisdom, according to which people are allowed to continue the kind of worship and belief to which they have been accustomed, in order that they mightacquire the true faithcreate a just and compassionate society, which is the chief object.