The Rabbis say: The butler – a fly was found in his goblet;4A fly was found in the goblet he served to Pharoah. the baker – a pebble was found in his loaf. That is what is written: “The butler of the king of Egypt and the baker sinned against their master” – in the service of their master. Rabbi Evyatar said: They sought to consort with the king’s daughter. Here it is stated: “Sinned” and elsewhere it is stated: “[How can I do this wicked thing] and sin against God?” (Genesis 39:9).5This verse was stated by Joseph as part of his refusal to commit adultery with Potiphar’s wife.
Why Pharaoh's Butler and Baker Were Imprisoned
Bereshit Rabbah 88:2