The modern idea of religion in the US and Europe is largely derived from the Catholic concept. But marriage existed long before the Catholic church, and probably before religion in general.
The Roman concept of marriage evolved out of the the pre-Roman family/clan system. And this seems to have happened in most places, where the early governments and religions simply documented and formalized existing practices.
Jay