"Marriage is a contract that can be transacted in church or by the government"
Well yes- but to be considered a legal marriage, government issues a licence at some point. Some churches do not recognize government issuedivorces but, this does not alter the legal status outside that church..