The rabbis link the name to the story told in the sidra of a handsome young man refusing the advances of an older woman, the wife of his master Potiphar.
Presumably Joseph was tempted, but only for a moment. Then “he refused and said to his master’s wife, ‘How can I commit such a great wickedness and sin against God?'” (Gen. 39:8-9).
There are three things, not one, which Joseph says in this sentence. He says he will not commit an act which is morally, ethically and spiritually wrong.
The moral wrong would be to have relations with a woman who was not his wife. The ethical wrong would be to betray his master’s trust. The spiritual wrong would be to offend against the word of God.
Note that it is not only human, earthly, expedient considerations which weigh with a tzaddik. A tzaddik does what is right because this is what his faith in God requires.
The Psalmist says, “I set the Lord before me always” (Psalm 16:8), and the Shulchan Aruch opens with the statement, “This is the fundamental principle of the Torah”.
A tzaddik is constantly in the presence of God and this affects every action he or she takes.
A similar thought is suggested by the way the late Rabbi Betzalel Zolti, Chief Rabbi of Jerusalem, interpreted Psalm 145:17, “The Lord is righteous (tzaddik) in all his ways and loving (chassid) in all His works”.
Rav Zolti says this could also read, “The tzaddik has the Lord in all his ways and the chassid in all his works”.
What made Joseph a tzaddik was that the presence of God was his constant companion and yardstick.