In the past marriages between different ethnicities or different social backgrounds or different religions/confessions or ofcourse same sex marriages were banned, because other people had the power to do so.
That's why government has to get involved, as the consent of the elected representatives of all people living in a country is a powerful statement.