IMHO minor government functionaries get the idea that its okay to disregard the law in favor of what they perceive as matters of conscience by the example set when state and local government behaves contrary to drug and immigration laws. In Washington state, several county sheriffs are refusing to enforce a new restrictive gun law passed by initiative. The state AG publicly lectured them about not picking and choosing laws to enforce based on personal beliefs. The same AG is a supporter of sanctuary cities.
Bradley “Chelsea” Manning got by with it. Their hero!