We see in the Torah the contrast between one Pharaoh in his generation and another Pharaoh in a different generation. When Yosef tells Pharaoh that Hashem was warning him about the approaching famine, this Pharaoh believed in the words of Hashem. He took them to heart and began acting on what he had heard from Yosef in the name of Hashem.
Centuries later, the Pharaoh of that time was also approached in the name of Hashem. Moshe came to him and said that he had been sent by Hashem to tell him that he should free the Jewish people from bondage and permit them to leave. This Pharaoh did not believe in the message and refused to obey. Why the difference in the reaction of these two Pharaohs?
Yosef’s message predicted that in spite of the imminent famine, Pharaoh had a way of preparing for it and could, indeed, become wealthy by taking the proper steps. Pharaoh liked this message from Hashem and believed.
Moshe, on the other hand, asked in the name of Hashem that the Jews should be freed. This was not advantageous for Pharaoh and, in fact, it was to his disadvantage to accept the message that Moshe delivered from Hashem. This was too costly for him. Hence, he turned it down.
Compare these actions to that of Jews who believe in Hashem in tragic times as well as in good times. How many Jews throughout history refused to abandon their faith in Hashem even when they were being tortured and killed for adhering to their faith?