This.
Whether anyone likes it or not this type of roles are necessary. They exist for other faiths too.
Things like marriage. Until the late 1980s/1990s if you got married in anything other than a of E church or a registry office your marriage wasn't legal unless you had a registrar attend to do the written part.
A lot of people had a registry office ceremony the day before their religious one, whether you were RC, Jewish, Muslims, Sikh, Quaker, whatever.
A Muslim marriage is a Nikkah, it is not recognised in English law (not sure about Scotland) so unless you have a registry office wedding or you are in a place licenced for a wedding with a civil registrar.
But if you have a Nikkah in Pakistan then register it in the UK then it is legally recognised, as long as there are only two people in the marriage.
I have no idea about other countries, but this is the kind of thing the job is advertising for someone to take on.
Some people take their faith very seriously and treat the restrictions of their faith as seriously as the law of the land.