IT IS ENTIRELY APPROPRIATE to read Genesis 39 as a lesson in moral courage, a case study of a God-fearing man who rightly perceives that an attractive temptation is in reality an invitation to sin against God (39:9), and who therefore cares more for his purity than his prospects.
Nevertheless, Genesis 39 must also be read in several broader dimensions, each with important lessons.
First, this chapter begins and ends very much the same way. This literary "inclusion" signals that the themes in the opening and the closing control the entire chapter. At the beginning, Joseph is sold into the service of Potiphar. God is so very much with him that in due course he becomes the head slave of this substantial household. We must not think this took place overnight; the chronology suggests eight or ten years elapsed. During this time Joseph would have had to learn the language and work his way up from the bottom. But all of this was tied to the blessing of God on Joseph's life, and Joseph's consequent integrity. At the end of the chapter, Joseph has been thrown into prison on a false charge, but even here God is with him and grants him favor in the eyes of the warden, and in due course becomes a prisoner-trustee. Thus the chapter as a whole demonstrates that sometimes God chooses to bless us and make us people of integrity in the midst of abominable circumstances, rather than change our circumstances.
Second, Genesis 39 serves as a foil to Genesis 38. Judah is a free and prosperous man, but when he is bereaved of his wife he ends up sleeping with his daughter-in-law. He deploys a double standard and shames himself and his family. (The fact that initially he wants Tamar executed for a sin he himself has also committed shows that he is less interested in punishing the guilty as a matter of principle than in punishing those who are caught.) Joseph is a slave, yet under the blessing of God retains his sexual purity and his integrity. Which one is happier in the eyes of the world? Which one is happier in the light of eternity?
Third, Genesis 39 is part of the march toward Joseph's elevation to leadership in Egypt. By the wretched means described in Genesis 37, 39 – 40, Joseph eventually becomes "prime minister" of Egypt and saves many from starvation – including his own extended family, and therefore the messianic line. But Joseph could not know how all of that would work out as he was going through his misery. The most he knew were the stories passed down from Abraham, and his own youthful dreams (Gen. 37). But Joseph walks by faith and not by sight.
Genesis 39; Mark 9; Job 5; Romans 9