Pharaoh hears that Joseph successfully interprets dreams. He summons him, and Joseph tells him that his dream means 7 years of plenty followed by 7 years of famine. So Pharaoh orders that food be stored for the next 7 years so some food will be available for the 7 years after that.
All this makes sense. But then Pharaoh tells Joseph:
Since God has made all this known to you, there is none so discerning and wise as you... I put you in charge of all the land of Egypt. [Gen. 41:39, 41]
That's a huge leap! First, Pharaoh does not believe in God(*). But second, and most important, Joseph gave him no evidence at all of his managerial excellence. And he puts this slave and foreign convict in charge of the country? Why?
You can always say that Hashem inspired Pharaoh to act that way. But has any commentator provided a more down-to-earth explanation?
(*) The Talmud makes that clear: "As for Pharaoh, who himself blasphemed God, the Holy One, Blessed be He, Himself exacted retribution from him.... Pharaoh blasphemed God, as it is written that he said to Moses and Aaron: “Who is the Lord that I should obey His voice?” (Exodus 5:2)" [Sanhedrin 94a-b]