A man is attacked by a gang of anti-semites. Totally drunk, they demand that the man eat a ham sandwich or else they will kill him. What should the victim do?
According to Jewish law, he should eat the sandwich. In fact, the Talmud (Sanhedrin 74a) asserts that there are only three laws that one must not transgress even at the cost of one’s life: "Rabbi Johanan said in the name of Rabbi Simeon b. Jehozadak ...in every law of the Torah, if a person is commanded: 'Transgress and suffer not death' he may transgress and not suffer death, excepting idolatry, adultery/incest, and murder."
Under threat of death one may eat non-kosher food, violate Shabbat and even steal, but one may not worship idols, take part in forbidden sexual acts or commit murder. What are the reasons for these three exceptions?
MURDER: Murdering another person in order to save one’s own life (not in self-defense), is, in effect, an attempt to do “Divine math.” Who can say whose life is more valuable? (Raba ... answered him, 'Let him rather slay you, rather than that you should commit murder; how do you know that your blood is redder than his [the intended victim]? Perhaps his blood is redder.' - Sanhedrin 74a).
ADULTERY/INCEST: Sexual immorality undermines society’s entire social structure. The repercussions of such an act can effect not just the man and the woman involved, but also a child who may come from such an act...for hundreds of years. (A child born of incest or adultery is known as a mamzer, a status that lasts forever.)
IDOLATRY: Any act of idolatry, no matter how minor, denies the omnipotence of God. Since serving God is the primary purpose of every Jew, and since God is the creator of all life, denying God by worshiping an idol is, in effect, denying life itself.