Human behaviour evolved. That is, our genetically-influenced behaviours that led to more offspring directly or through close relatives tended to increase in populations. Not all behaviours are genetic.
Some obviously are, like swallowing (which we share with our distant relatives, snails). Some are more difficult to attribute to genetic influences. However, where a behaviour is widespread or universal it can be hypothesised that it has either no genetic basis in itself and arises as a side-effect of something else, or that it confers an evolutionary advantage.
It is hypothesised by some evolutionary biologists that a tendency to believe authority figures and to believe that the material world can be influenced by group behaviours such as incantations and invocations conferred a relative advantage over those groups that had this in a lesser degree. Unity, common purpose, willingness to sacrifice self fora group beyond immediate kin and the overcoming of despair arising from the evolution of consciousness and knowledge of our own mortality are hypothesised examples of such advantages.
Humans organised into anti-religious or irreligious groups such as communist parties often exhibit the same behaviours and the behaviours can be seen even in secular neighbourhood community groups.
So it seems unlikely that religion was ācreated to control peopleā. Rather it seems likely, from an atheist point of view, that religion and similar patterns of group-forming beliefs are at the basis of human society and provided in the past n evolutionary advantage.
This hypothesis incidentally neither supports or opposes the truth of any particular religious belief except, of course, fundamentalist creationism which is opposed by all observations of biology. It is perfectly compatible with Catholic belief as far as I can see. But past experience less me to hypothesise that some others may not agree.