How then can I do this great wickedness and sin against God?"Joseph has been sold into slavery. He is a member of Potiphar's household. He's a good looking man, and Potiphar's wife has taken an interest in him. Not a comfortable position for a slave to be in. He needs to keep the wife happy, but he also needs to keep the man he works for happy. Joseph points out his value to the wife
"Behold, because of me my master has no concern about anything in the house, and he has put everything that he has in my charge. 9He is not greater in this house than I am, nor has he kept back anything from me except yourself, because you are his wife. How then can I do this great wickedness and sin against God?"But she doesn't much care about that, she just wants what she wants. And when she couldn't get it, she accused him none-the-less. But Joseph....I do like how he asks her...how can he sin against God in this way?
Joseph wouldn't know it was sin unless he knew God's word. But he knew it. Before he was a slave he was a favourite son in an Israelite family. He would have been taught God's word. And so he stood by what he knew. Doing wickedness was a sin against God.
The rest of the story shows how Potiphar believed his wife. He had Joseph thrown into prison. BUT while Joseph was in prison
the LORD was with Joseph and showed him steadfast love and gave him favor in the sight of the keeper of the prison. 22And the keeper of the prison put Joseph in charge of all the prisoners who were in the prison. Whatever was done there, he was the one who did it. 23The keeper of the prison paid no attention to anything that was in Joseph's charge, because the LORD was with him. And whatever he did, the LORD made it succeed.The Lord showed his favour to his faithful servant Joseph.