If you're a public servant, you don't get to choose which parts of your job you will do, and which you won't do. If an action falls within your job responsibilities and scope of duties, you have to do it, unless you've been granted an accommodation due to a disability. That's how I've always understood things.
But, apparently, some North Carolina magistrates and clerks in county register of deeds offices find it unconscionable that they be asked to perform marriage ceremonies for same-sex couples now that Amendment One, the 2012 voter-approved law prohibiting same-sex couples from marrying, has been struck down. (A federal judge ruled it unconstitutional in the fall, after which same-sex couples began marrying throughout the state, and some magistrates and clerks resigned in protest.)