The Torah relates that when Potiphar’s wife tried to seduce Joseph, he adamantly refused. Then he said to her, “My master has entrusted me with everything he owns, and has not kept anything back from me except you, for you are his wife. How could I commit such a great wrong?” (Genesis 39:8-9).
The Rabbi of Gur commented that the sequence of Joseph’s words is important. His first response was to adamantly refuse, categorically and absolutely. Only after his refusal does he explain himself.
When faced with a serious threat to your life, your first action is to run away. After you’re safe, you can analyze the situation.
When confronted with something of questionable morality, your first reaction should be to refuse. After that you can reason and explain why. If you try to explain before refusing, you may rationalize why it’s OK.