As people created more efficient systems of communication and more complex governments in early agrarian civilizations, they also developed what we now call religion.
Religion can be described as a social institution that involves an agreed-upon system of beliefs and practices that recognizes things that are "sacred" or set apart from society as extraordinary, inspiring awe, and deserving of reverence.
At its core, religion was a way for humans to seek comfort in the unknown and make sense of the world around them. There were so many things that early man struggled to comprehend. By developing a belief system that included spirits and gods, humans better related to their world simply based on stories and faith.
Whether laying out guidelines for expected behavior or consequences for violating the laws of the gods, religion also has been used to control and guide people in their daily lives. By requiring believers to "have faith," religious leaders relied on the concept of belief, either in the teachings and practices of the religion, or the interpretations of the same. Those who would defy the expectations could be accused of acting against the society, as a whole. It is no small wonder that leaders in ancient times also claimed to lead the religion of their people, or - quite literally - be godlike figures within their faith.
Religion provides social cohesion to help maintain social solidarity through shared rituals and beliefs
Religion offers social control to enforce religious-based morals and norms to help maintain conformity and control in society
Religion offers meaning and purpose to answer any existential questions
Religion can be an expression of a culture or society. As individual people believe in a force(s) greater than themselves, they can agree on who/what that may be. This agreement can be expressed in groups, and demonstrates the power of a shared belief system.
Many of the newly developed or reformed faiths combine modern scientific fact with ancient beliefs. In some instances, this leads to newer understandings of the ancient beliefs, themselves. In other cases, the modern concept of religion is flexible and various constructs of faith develop to suit the needs and/or beliefs of the population.
Knowing where a religion came from and why it was developed assist historians in putting the pieces together to understand a people or a culture of a civilization. To that end, origin stories serve as important components when analyzing religions for similarities and overlapping themes. This may prove some stories and beliefs to be universal, with cultural or geographical variations likely to suit the population of followers in any one particular faith.