Theory.
Religion was started by some form of "government" in the early times of governing. The idea was to create a "book of laws" according to what they thought was right/wrong. Now, remember, other then the fact that back then things were much different then they are now morally, in other cultures right to them could be very wrong to us. Some of the laws they wanted followed were things such as;
NO murder or HELL.
NO infidelity or HELL.
NO modifications to the body or HELL. (This would most likely have been because they wouldn't want people trying to trick authorities with disguises)
NO being gay or HELL.
NO committing suicide or HELL.
The list goes on. Then we get the idea that HELL is the worst possible place you could ever imagine. Many plot holes are in the Bible, which would be common for something created so long ago. The thing is, whether you agree with religion or not, we DO need it. Simply because it keeps the general population of people at PEACE. By this, I mean, many people don't murder others not because they are afraid of prison, but afraid of Hell. The distinct possibility that MAYBE just MAYBE God really does exist going through the back of our head, keeps us sane rather then savage. That little subconscious really does make a huge difference on how we as people act in current society. I think the suicide, homosexual, murder, etc. RATE would be much much higher, MUCH much higher without religion.
... The explanation of all the "other" religions out there, is simple, all connected with the original theory, every religion created was formed by that country or that "places" government of people. That's why there is so many religions because in the early days there was so many different colonies of people, villages, etc. that when they finally did get the idea of governing, they also got the idea of created a "book of laws" which we are still following those laws, today. Ironic.
Every religious book wants you to follow a line of commands, worship a higher authority, or you will end up in the worst place imaginable. Sounds very much like laws, government, prison, in early day terms if you ask me.