Why did Yosef interpret the dream of the Sar HaMashkim to mean that he would be restored to his job while he interpreted the dream of the Sar HaOfim to mean that he would be hung?
The Sar HaMashkim was in jail for failing to detect a fly in Pharoah's cup. He dreamed of vines growing, grapes sprouting, of squeezing those grapes to produce wine, and finally serving that wine to Pharaoh. The Sar HaMashkim knew he had slipped up. In his dreams he replayed every step of the winemaking process, redoing it over and over, striving to correct his error and serve the perfect cup to Pharoah.
The Sar HaOfim was in jail for failing to detect a pebble in the bread. The Sar HaOfim dreamed of loaves of bread sitting in their baskets, ready to be served. The Sar HaOfim did not dream about the process of bread baking, he never considered what he had done wrong, what he might do differently, what steps in the process of baking he could correct or improve on.
The attitude of the Sar HaMashkim, explains R' Leibele Eiger, was one that could lead to tikun. Not so the attitude of the Sar HaOfim.