He was strikingly handsome . . . . she pestered him day after day, but he stood his ground. Genesis 39: 6, 10
For the ones who cannot be moved to break, let alone alone scratch the surface of the Ten Commandments, the Devil uses their goodness, their steadfastness, their good intentions to create road blocks and pitfalls of temptation.
The Devil used Joseph’s handsomeness to create a convincing scenario. When Joseph prevailed, the Devil continued to make his life worse by using Joseph’s loyal, non-defensive attitude against him. You don’t read about Joseph telling anyone his side of the story. He just let it go, became the innocent that bore the consequences of guilt.
Joseph basically just shut up and let the story play itself out. And “the head jailer gave Joseph free rein, never even checked on him, because God was with him; whatever he did God made sure it worked out for the best.” (Genesis 39:23)