How can a just law have a claim on our obedience? Murder is wrong, regardless of what the law says about it; we expect people to refrain from murder because it’s wrong, not because it’s prohibited or punished. I’d be offended if someone suggested that it’s only respect for the law that’s restraining me from committing murder. But this suggests that we don’t have an obligation to obey laws that prohibit murder — a morally conscientious person should never find himself obliged to submit to them.
“The more just and valuable the law is … the more reason one has to conform to it, and the less to obey it,” writes legal philosopher Joseph Raz. “Since it is just, those considerations which establish its justice should be one’s reasons for conforming with it, i.e., for acting as it requires. But in acting for these reasons one would not be obeying the law, one would not be conforming because that is what the law requires.”
(Note, though, that Raz says the paradox is only apparent — see his full paper here.)
(Scott Hershovitz, “The Authority of Law,” in Andrei Marmor, ed., The Routledge Companion to Philosophy of Law, 2012.)