The courts will not enforce a contract the purpose of which is to achieve an illegal end. This should not really surprise anyone, but still lawyers like to interpose hypotheticals, and invent concepts like severability.

See also