North Carolina has now deliberately embraced official discrimination, but not for the first time.
https://en.wikipedia.org/wiki/Anti-miscegenation_laws_in_the_United_States
Ironically, those of you cheering to see this nexus for discrimination being opened up would be the most vocal in objection if, say, a magistrate, a government official, cited their own freedom of religion in refusing to perform, say, a marriage between a Christian couple. Holding a public office of trust and responsibility creates a duty that sometimes trumps personal feelings that you may hold, and if you weren't so blinded by your homophobia, you'd see that perfectly well.
As for the officials who mistake a courtroom for a church, and who think that they are performing some sort of religious service instead of public service, I'd say good riddance.