וַיְהִי אַחַר הַדְּבָרִים הָאֵלֶּה - And it came about, after these words.... [Vayeishev 40:1]
The "words" that are referred to here are those of Potifar's wife, who bad-mouthed Yosef throughout Egypt.
From the actions of Potifar's wife, we can learn a powerful lesson about judging other people:
At first glance, Potifar's wife's actions appear to have been utterly evil. Not only did she cause Yosef to be sent to prison, but furthermore, she spoke badly of him so that his name was blackened throughout Egypt.
Rashi however enlightens us to the truth, that even these actions were intended for the sake of Heaven! Despite the fact that she was brought up in the corrupt, idolatrous atmosphere of Egypt her intentions were pure, to the extent that our sages compared her to Tamar, the mother of "strong ones and righteous ones" [Rashi].
From this we can learn the importance of not judging other people by their first appearances.
Source: Sichos of the Lubavitcher Rebbe
Art: Abraham Leon Kroll