A commenter on the thread about photos of rape of a minor being child pornography asks,
But if the laws were meant to have exceptions for possession (to retain as evidence and transmit to the proper legal authorities) then why was it not simply written into the text of the law. Similarly, the prosecutor with his copies, duplicated, retransmitted within his office, shared with his staff have no special immunity because the law most certainly does not grant waiver of any kind to anyone.
Many criminal laws, and criminal law defenses (such as self-defense), were originally created by judges as part of the common-law-making process. American jurisdictions have largely (and sometimes entirely) codified their crimes, chiefly by just adopting the common-law rules. But some jurisdictions — such as the federal government — haven’t codified the defenses. The self-defense defense, for instance, generally isn’t written into the text of federal laws; it remains as a common-law defense that existed long before the federal statutes.
Many California criminal defenses are codified, and at times the California Supreme Court has said that there are generally no common-law defenses recognized in California. But there is a long line of California appellate cases recognizing the defense, and to my knowledge California commentators assuming those cases are good law — certainly the California Supreme Court hasn’t moved to overturn them.
Perhaps it would be best if Congress and all state legislatures codified all their common-law defenses, and barred judges from recognizing new defenses on their own. But that just hasn’t been the uniform pattern in the U.S. And as a result, one can’t just say that a defense that isn’t statutorily mentioned can’t be raised, at least unless the relevant legislature has expressly adopted such a rule.