Genesis 39:9 “There is no one greater in this house than I, nor has he kept back anything from me but you, because you are his wife. How then can I do this great wickedness, and sin against God?”
Potiphars wife had been checking Joseph out, but in a lustful way. Opportunity presented itself for her to be alone, but were they? Joseph had a proper assessment in that God knows & sees. Not that he didnt find her attractive, thats not the point. She is married and I dont want to sin against God. He didnt use this as an excuse because he was sinned against often. He holds his integrity. The worlds culture doesnt see this as wickedness or sin. Its an "affair". Its sin. He literally fled naked because she grabs his garment then she lies about him saying he came on to her. However, God was with Joseph and honors his integrity.