Joseph gets thrown in jail, and even in there he finds a way to help others. Being opened to the need of others gave him the merit to later on be the viceroy of Egypt. From here we learn that looking outside of ourselves even during difficult times will end up reaping rewards.