This is so bizarre for an American. We have a church or justice of the peace wedding ( civil) but both are legal.
So there only the civil union counts?
It depends on the country. A while ago I wrote sth similar and got a bit raked over hot coals and maybe rightly so, because I don't know the law of various countries, but in most countries church weddings count only in the church and are lawfully not acknowledged, because of the seperation of state and church/ religion. As LDJJ above notes, that's what Albert & Charlene had to do and Rainier & Grace before them and many other royals too of various other countries. So in some few countries a church wedding might be enough, because appropriate papers will be signed and are acknowledged, but in many the church part is basically for the couple and church only and has no legal bearing.
In some cases when royals marry a church wedding will be legally binding, even though that is generally not the case for other citizens, often a legal representative is then in the back room and papers are signed, away from everyone with only the couple, minister, legal person.