Yosef was bought from the Ishmaelites by Potiphar, one of Pharoah’s ministers. He rose to prominence in the home as Chief of Staff and was entrusted with running the palace.
Because of this, he began to eat well and dress well, and he attracted the attention of his master’s wife.
When the wife of Potiphar tried to convince Yosef to sin with her, he refused, over and over again.
Yosef told her, “There is no one greater in this household than I, and the only thing prohibited to me is you, as my master’s wife.”
He concluded, “Were I to do as you ask, I would sin to G-d.”
What was Yosef saying here? Was he bragging? Perhaps even encouraging her with his power? And why did he say it would be a sin to G-d, when it would be an act of treachery against his master?
Chazal say, “Whoever is greater than his fellow, his evil inclination is greater.”
Yosef was building himself up not for her benefit, but for his own.
He reminded himself that Hashem had given him success for a reason, and it was NOT to be chained to this woman for eternity.
Were he to give in to his desires, more than rebelling against his earthly master, he would be rebelling against Hashem by using his gifts and talents for the wrong this. This was a pep talk to remind himself that he was above this sin, and it helped him not give in.