You hear "explain the world" and "control the populace" but those seems like very presumptive and biased explanations.
If you mean the origins of spiritual beliefs you are asking a question that very few people can answer competently IMO. What you have to remember is that religions pre-dates history much more than we normally realise.
Here is a chiselled totem of a half lion, half man, made 30 000 years ago, which indicates that these people perhaps believed in some supernatural figure. We also find Tsodilo around this time, a definitive place of worship.
We can go back further, if you'd like. Evidence of burial with grave goods and the appearance of anthropomorphic images and cave paintings may suggest that humans in the Upper Paleolithic, 50 000 years ago, had begun to believe in supernatural beings. (Thames & Hudson, 1996)
100 000 years ago, the oldest burial of a modern human, in a specific grave with tools, ornaments and animal horns.
And finally, around 300 000 years ago we find Neanderthals purposefully burying their dead and marking the graves. source
The point im trying to make is that although there's nothing close to a consensus on the evolutionary/philosophical/psychological origins of religious beliefs, that does not mean that ignorant people spouting "religion is evil it's just made to brainwash people into being subservient" are right.