There is no fundamental connection between morality and law. Law derives from the combination of rules and the existence of an authority with the ability and will to enforce them, at least most of the time. Morality, by contrast, has to do with situations, the options available to individuals, and the likely consequences of possible actions.
It is possible to imagine cases in which particular actions are moral but not legal (riding in the section of the bus reserved for white people, despite being black in segregationist America or South Africa) as well as actions that are legal but not moral (clearcutting a huge swath of forest after buying a permit from a purely self-interested king). If you accept that it might be morally necessary to lie to a group of Nazi soldiers about where a group of Jewish children are hiding, you accept that it can sometimes be acceptable, or even laudable, to violate the laws that happen to exist in a certain state at a certain time. Simply following the law without evaluating its relation to morality makes a person no better than a secret police officer, mindlessly following orders to round people up to face uncertain fates.
Pragmatism isn’t a morally relevant quality, at least in and of itself. The fact that the state may punish you for breaking the law or failing to act as the law demands doesn’t have any moral force, one way or the other. The relationship between pragmatism, morality, and law is based around the pragmatic evaluation of the consequences of obeying or not obeying the law. Not obeying the law against arson is unlikely to have positive effects; ignoring the law against trespassing, when some important purpose compels the unapproved passage through someone else’s property, is likely to be defensible in many more cases.
Reasons why the law can be moral
In democratic societies, a good case can be made that the law is usually compatible with morality. Partly, this is the result of the democratic process, which includes some relatively good protections against the unjust domination of one group by another.
Sometimes, law is important because it provides clear guidelines and thus produces better overall outcomes. A good example is speed limits. We can agree pretty easily that there should be some limit, though people might disagree on what it is. It is safer and easier to choose a reasonable figure than to let everyone decide individually. Both domestically and internationally, law plays an important coordinating role. It keeps radio stations from interfering the the transponders of aircraft and ensures that one’s laptop can be plugged into any properly functioning electrical outlet in the state.
At a higher level of abstraction, law is important for reconciling divergent moral perspectives: say, one that sees it as unacceptable to portray Mohammed visually and another that has no such qualms. Particularly within a democratic system, law plays a vital role in creating the boundaries within which we can make demands of one another. For instance, I may have no right to demand that you remove a religious symbol from your car or home, but perhaps I can if it is on your desk as a judge or police interrogator. Exactly how this balance is struck is difficult to manage, and it is likely that multiple acceptable options exist. Reaching one of those options, however, depends on engaging with the law, rather than simply accepting the present form at face value.
Reasons to disobey law
There are two major reasons to disobey the law: because it is unjust, or because there is an ongoing emergency.
Refusing to turn up for duty when drafted to serve in an illegal war could be an example of the former. So could sharing a bottle of wine at dinner, while camping in a public park. In each case, an individual evaluation is made about the appropriateness of the existing rule to the present situation. If a compelling case can be made that the rule is harmful or irrelevant, it is sensible for thinking people to disregard it. Civil disobedience goes a bit further, since people go beyond breaking a law to activity and openly demonstrating the breach. This too can be a moral action, if it calls public attention to the injustice of an existing law, or the importance of some competing claim.
Breaking the law in emergencies is relatively uncontroversial. A sixteen-year-old who violates the terms of a learner’s license by driving a dying relative to the hospital is breaking the law in an entirely excusable way. This is recognized in the common law through the defence of necessity. One of the better features of the common law system, it is an overt recognition that law exists to serve the majority of cases, and will fail to produce good results when applied directly in some circumstances.
A duty of evaluation
In the end, the sensible position to take is accepting that in most places, most laws have a sensible reason for existing. That does not, however, absolve individuals of the duty to consider the circumstances in which they find themselves and the appropriateness of acting in one way or another, on the basis of what they reasonably expect the outcome of their actions to be. The alternative is a nation of unthinking robots, following rules that may be well balanced and wise – or arbitrary and viscious – with no more contemplation or personal responsibility than a missile launched by the state at a target that looked unfriendly to the rulers.