You talk about the EU as if it is one legal jurisdiction. We in fact have 28. In Sweden you can get married either by a government official or by a vicar in the church (but only apparently a vicar of the Church of Sweden).
You right, I should have said Netherlands, because I was replying to that specific example by the parent comment, and after doing some research, it looks like EU is all over the place on this topic.