Yosef was summoned to interpret Pharaoh’s dreams. He did so, as he says, with the help of Hashem. Then he advises Pharaoh how he should proceed having been informed of what lies ahead. Everyone asks the question, if he was called to merely interpret the dreams where did he get the temerity to also give uncalled for advice.
A Rabbi once gave a convoluted answer to this question by telling a story. Two ministers, who were constantly seeking honors, came to the train station on the same day and found a band playing great music. Each of these ministers claimed the band was playing in his honor. There was a poor man standing there shaking from hunger.
The ministers decided to approach him and ask him for whom the band was playing. He asked them for a hefty sum to answer the question and the ministers obliged. He then told them, “The band was not playing for either one of you but for me so that I should be able to earn some money to feed me and my family.”
Similarly, Yosef thought, Pharaoh’s dreams were neither for Pharaoh nor for his Egyptian interpreters who could not solve the puzzle of the dreams. Hashem could have brought the famine without advising Pharaoh of what will happen. He realized that the dreams were for his own benefit to get him out of prison, so he offered his advice which he knew would result in placing him in charge.
It is often difficult to understand why certain things happen. We must, however, believe that there is a good reason even if we can not see it.