In the fourth Pasuk of this week's Parsha, it says הצור תמים פעלו כל דרכיו משפט..., "The mighty rock (Hashem), His deeds are perfect for all His ways are justice. He is a God of faithfulness and without fault, he is just and fair." This Pasuk was spoken by Moshe to Bnei Yisrael to reinforce their faith in Hashem. Moshe knew he must do this because when things begin to seem unjust and unfair, people tend to lose faith.
This statement seems to show Moshe's faith in Hashem. However, it seems strange that he would put so much stress on a phrase that says how fair and just Hashem is. After all, he had led Bnei Yisrael through the desert for forty years, but because of one sin, Hashem would not let him enter Eretz Yisrael as he wished. Was Moshe's sin of hitting the rock so terrible that Hashem should completely disregard all the other great things he had done and use this one event to punish Moshe so greatly? The Midrash even says that Moshe made 515 pleas to Hashem, but Hashem would not give in.
We see that Moshe had reason not to understand Hashem's ways of judgement, but still made this declaration to Bnei Yisrael. Moshe had incredible faith in Hashem, and accepted the fact that God's ideas are always right, even if they do not seem logical from our point of view.
Rabbi Shimon of Yaroslav lived a very long life. When people would ask him his secret of living such a long life, he responded, "When someone complains about how unfair life is, and asks to know why such bad things are occurring in his life, he is taken up to heaven so it can be explained to him." But Rav Shimon rarely complained, he just continued living.
If we have faith in Hashem and trust in him that he is being fair, we will live much happier lives.