In this chapter, we learn that Joseph is blessed in all things, including sex appeal. Just as Dinah and Sarah (and possibly Rebekah) were the targets of gentile royal lust, so also Joseph proves irresistible to the opposite sex. Evidently both the patriarchs AND the matriarchs were all smoking hot. Also, it would appear that our modern American obsession with personal appearance and sexual attractiveness, especially noticeable in television and movies, has a very ancient pedigree indeed. One might say it is rooted in those fabled "Judeo-Christian values" I keep hearing about from the politicians.
In any event, Joseph manages to preserve his virtue by fleeing the house, and then gets smacked with a rape charge, in one of the earliest documented cases of "he said / she said" in a sexual assault trial. Personally, I consider the wife's story to be the more plausible of the two, but as they say "history is written by the winners" and I don't see anyone worshipping the gods of Egypt around here.