There are a variety of reasons that can be behind the founding of a religion — some are good, and many are bad. Thus both good and bad religions have been created.
There are religions that started as a means for worship. Some to help people improve themselves spiritually or otherwise.
Others were specifically created just to control and have power over the people. But even religions that started with good intentions, degenerated over time into self-serving power structures whose main function was to control people, and to make money (And the profit shall lead them).
Religions vary in their methods and functions. Most offer their members personal salvation through following the religion’s tenets (beliefs, rituals, scripts and dogma).
And thus, they insinuate you will not find God/The Creator or salvation, if you don’t follow their particular religion/ scripture/ dogma.
Many religions also aim to fill an emotional, intellectual or psychological need in people’s hearts and minds. Generally, each have their own ‘dogma’ – answers to spiritual questions about God, who we are, and the rules that we should live by.
Some religions control by using people’s insecurities, and have even been formed based on the insecurity of an ignorant society.
Some were based on fear. There is the fear of hell (religion as ‘fire insurance’).
There is also the fear of God. This idea basically comes from need to worship and serve a God, or some kind of powerful supreme being, because you actually need to fear Him if you don’t – because He is all powerful and has negative emotional attributes, commits atrocities when angry or jealous, and allows great suffering and disasters when He could easily stop them.
Worshipping that kind of a God is not much different than being respectful to, and paying homage and taxes to, an evil king, or warlord of the realm, because if you don’t, he may come burn down your hut or your fields, or kill you and your family, rape your wife, etc..
In fact, that is precisely what many religions did, and how they used their concept of God.
But as opposed to being just a King or a warlord, people were told it was an all-powerful being, like a super powered evil alien from outer-space, bent on taking over and controlling all the people of this planet…