Well.....from what we know lots of ancient societies had a set of beliefs that largely arose from a need to understand the world around them, explain how we got here and to order society. Some of these sets of beliefs involved faith in (or just fear of) gods. And marriage occurred in these societies, and in some cases religion was heavily involved in that. In others, manifestly not. In Ancient Greece for example, marriage was pretty much a property transaction. For the first 1100 years of Christianity, marriage and religion co-existed, but for the vast majority of people the Church had little to do with their marriage (in whatever form that existed).