Organized religion mostly likely came about to fill a void in human societies. The void was most likely a workable paradigm for daily life and human interaction. This, as I see it, is the base level.
The way to enforce the life and interaction paradigms, to me, seems to be dragging one's spirit or soul into the mix. "This is what your spirit is and this is where you came from and this is where your spirit is going when you die so this is how you have to live" seems to be the most common feature in religions. As soon as a person first loses someone in their life to the reaper, the religion is put to the test. The individual's level of comfort with the prescribed afterlife will forever alter their relationship with the religion. In the vast majority of religious texts I've read, or religious ideas I've been exposed to superficially, the bait seems to be the promise of the afterlife spent in paradise, whether or not you have to go through several incarnations to get to that point.
It is slightly ironic to think that one of the key factors in the social evolution of our species (that is, the idea that you must behave yourself or your spirit will suffer long after your corpse has expired), has gotten us to the point where we can contemplate what exactly it is, and to deny it should we see fit.
Thusly, religion can be perceived as a crutch for the entire human species. Whatever your position is on the subject of religion, the fact is that your forebearers most likely subscribed to the ideas they were presented by their local clergy. This altered their standing in their communities, influenced their migration patterns, and has by and large built the wonderful fucked up patchwork quilt that is humanity today.
As an aside, I choose to walk my own path and let my spirit figure it out. I believe each holy book is a piece of the overall puzzle. But it is important to note that each of us, after our puzzles are all put together, will see a different picture. Just food for thought.