I sincerely can't wrap my head around religion. One of the reasons being that right now someone could probably just come up with some crazy story that nobody would even dare to take seriously as a work of investigative journalism and write it down in the form of a holy book. Then through some clever marketing and a gargantuan amount of luck, the writer could potentially create the most popular religion on the planet in a hundred years. Some of the people following said religion might even interpret the book literally and follow all of the crazy rules that the writer added just for giggles: Thou shall not tap dance on thursdays. Thou shall eat 30 things each day, no more, no less. Thou shall not fall prey of logic, for logic is the devil's work. And so on.
The point being: Anybody could start a religion, and given sufficient time, luck and misinformation, people will eventually treat it VERY seriously.

To me, religion is built by society ... just like sports. Just as anything can be a sport if enough people practice and follow it, any story can be a religion if enough people believe and have faith in it.