It's been around a very long time and has been carefully crafted into a nearly perfect system that is:
- hard to refute because there's nothing tangible or verifiable, it's all "in your heart"
- comforting to believe in
- self perpetuating
- effectively supported by confirmation bias and many other logical fallacies
It was probably as simple as someone answering questions about thunder and the tribe listen to him, he becomes a holy man, and it spreads.
The first gods were responsible for answering all the tough mysteries.
The priests were the go betweens, and they probably quickly realized they had power over the common people and could manipulate them easily.
So each priesthood picked the best ways to perpetuate the religion and keep the priests in power. Most religions follow the same basic rules, probably created through trial and error, basically the evolution of religion based on how our "believing brain" works.
The way religion is set up:
- you can't question whether there is a god or not
- you can't argue against faith/god
- it works great for parents to indoctrinate their children because it's like a free babysitter, the fear of punishment by someone who sees everything
- it answers man's greatest fear: what happens when you die
- you get to live forever, which is great if you follow the rules
- it's a great motivator to be good because of eternal punishment
- you don't have to think for yourself (in fact you're encouraged not to). You're told all the rules that you need to follow.
- it's easy. Your religion gives you your morals and rules to live by.
Why it's hard to refute
- people are indoctrinated from birth
- it's cultural/societal, the majority in a given area follows the same religion
- it's part of peoples' basic beliefs. it's often their foundation
- we are by nature easily deluded when we like something. we easily use confirmation bias and all the other logical fallacies to back up what we already want to believe
- people can rationalize almost anything when they believe it.
- the belief comes first, the rationalizations follow
- cognitive dissonance allows us to hold opposing ideas and information in our minds at the same time
- every good event is attributed to god favorably, but every bad event is the person's fault for breaking the rules.
- Satan is also easy to blame
- all questions are answered with "god works in mysterious ways" and "god did it"
- it's easy, you don't have to question anything
- the fear of death is the biggest motivator. so it really drives people to comfortable answers. you get to live forever.
- god takes care of you and watches out for you. You have a father figure taking care of you all the time
- the flip side is that god keeps you in line by watching you all the time
- you don't have to take responsibility for anything
Please feel free to add to this. I know it's not complete.