In the current battle between Apple and the FBI regarding gaining access to the cellphone used by the San Bernardino terrorists, the government has emphasized how great the need is to determine who else might have been involved and honor the obligation to the families of the victims to gather all relevant information. No one can quarrel with the goals and Apple certainly does not, but the motivation is irrelevant if there is a constitutional violation involved in demanding access.
Frequently when judges are criticized for rulings in favor of criminal defendants, the heinous nature of the crime or the brutality of the defendant in committing it are emphasized. But the Constitution does not have a sliding scale for enforcement. The rights afforded are not reduced proportionately as the crime worsens. Really bad crimes and criminals do not receive less rights than those less offensive. So why the government needs this information--no matter how important or understandable---cannot affect the decision as to whether or not it can be compelled. And, of course, in this case Apple is not accused of a crime, but rather as a reluctant witness.
The government also mocks Apple's defense suggesting that it is based more upon economics than principle. Apple has made a commitment to its millions of customers that its phones are secure, and it has a right and duty to protect that representation. But the most significant aspect of the dispute is the apparent requirement that Apple develop software to gain access to the information the government seeks. If accurate, the government should not be able to compel any person or company to invent, create or manufacture something that will aid law enforcement no matter how pressing or noble the cause.
Among other arguments, Apple asserts its rights under the First Amendment. Although it might be a stretch--- compulsion from the government to create software might violate the Thirteenth Amendment as well---the prohibition against involuntary servitude!