One popular reaction to Kim Davis is that "She should just do her job or resign."
That's a reaction which contains several dubious, unexamined assumptions, some of which I've already addressed.
In addition, I think some people feel that every gov't employee can't be a Supreme Court in miniature. They can't substitute their own interpretation of the Constitution for the Supreme Court. If that were the case, then chaos would ensue.
Let's consider a comparison: I'm not a JAG, but to my knowledge, the military draws a necessary distinction between lawful and unlawful orders.
I believe that barring extenuating circumstances, a soldier is duty-bound to obey lawful orders. He can get into a lot of trouble if he disobeys a lawful order.
However, a soldier is duty-bound to disobey an unlawful order. He can get into a lot of trouble if he obeys an unlawful order. (This is true in law enforcement as well.)
Take the Mỹ Lai Massacre. To say the soldier should either "do his job or quit" is hardly the right response in that situation.
In addition, it is initially up to the soldier to make a personal determination about the legality of the order. Now, his decision may well be reviewed. But he is required to exercise his individual judgment regarding the legality of the order. In that respect, every soldier must judge for himself. Every soldier must be a military tribunal in miniature.
That's not what it may come down to in the final analysis, but he must be able to justify his actions. It's not enough to say "I was just following orders." Rather, it's incumbent on him to interpret the legality of the order.
Seems like pretty good motivation to obey any order you're given, right? Nope. These articles require the obedience of LAWFUL orders. An order which is unlawful not only does not need to be obeyed, but obeying such an order can result in criminal prosecution of the one who obeys it. Military courts have long held that military members are accountable for their actions even while following orders -- if the order was illegal.
In principle, you might object that it's chaotic to say every solider has an obligation to second-guess the legality of orders, yet that hasn't destroyed military discipline. And the alternative is the Nuremberg Defense.