The Cupbearer and the Baker
They each had dreams on the same night. Joseph could see that they were sad the next morning and he was concerned for them. Instead of being filled with self-pity about his own imprisonment, Joseph had compassion for others.
God enabled Joseph to see into the future and thus to correctly interpret these dreams.
Frequently in the Bible, God speaks through dreams. Scripture show this (Genesis 20:3; 28:12; 31:11; 31:24; Numbers 12:6; 1 Samuel 28:6; Joel 2:28; Matthew 1:20; 2:13; 2:22). But we should not leap to conclusions that every dream we have is a revelation from God. Dreams can come also be a result of overactive minds or daily events: A dream comes through much activity . . . For in the multitude of dreams and many words there is also vanity (Ecclesiastes 5:3, 7).
But as we will see Joseph had insights from God as to what dreams meant ... and this will come to his advantage when he interprets Pharaoh's dreams in Chapter 41. In this case, Joseph was, in fact, guided by God to see the meaning of the dreams of his fellow prisonmates: the cupbearer would get his job back with Pharaoh but the chief baker would be killed. This is exactly what happened. When the cupbearer got his job back, he quickly forgot about Joseph ... who once again suffered at the hands of selfish people.
While Judah was unfaithful to God (Chapter 37), Joseph remained fiercely loyal to God. Judah was punished and Joseph was rewarded. God will be with us, even when we are impatient. He has a plan and a time for that plan that are both outside our knowledge. What we can count on is his grace, mercy, forgiveness and love. God is truly our friend.