The nusach of Yizkor, is שוכן הרחמים אב מרומים, "Compassionate Father Who dwells in heaven." Also, at a levayah, people say ל-א מרומים שוכן רחמים מלא, "Hashem Who is full of compassion and dwells in heaven."
Why do we mention in these tefillos that Hashem dwells in heaven? It is because we are saying, "In this world, Hashem's ways might not appear like רחמים, compassionate, but Hashem dwells in heaven, and from that vantage point, it is clear and evident how everything is compassion and for the good.
Moshe Rabbeinu asked Hashem to explain to him why there are tzaddikim who suffer and resha'im who prosper (see Brachos 7.) Hashem responded (Shemos 33) אתי מקום הנה, "There is a place near Me..." Hashem was telling Moshe that if you will come to My place, in heaven, you will understand, and you will see that everything is for the good.
It can be compared to a person on an airplane. From up there in heaven, he sees so much further than a person looking from this world. Hashem told Moshe, come up to heaven, and you will understand how everything is compassion and just.
The Chofetz Chaim said that this is the reason an ehrlicher Yid is often called a "hechere Yid," a high Yid. It can be compared to a person standing near a fence and can't see over it. But someone tall can see above the fence. He sees so much more than others. Similarly, a hechere Yid is a person who can see the world from a higher perspective, and such a person knows that the world is run with chesed and rachamim.
The Chofetz Chaim told a mashal of a person who came to a beis medresh for the first time in his life, and he thought that the gabbai distributed the aliyos unfairly. The gabbai called up a young bachur for the first aliyah. "Why doesn't he call up a respected person for the first aliyah? The boy is probably his relative." The next aliyah was given to someone sitting in the back, and the next aliyah to someone sitting on the left side of the beis medresh. There didn't seem to be any method or order. "These are his friends," the man assumed. "But it isn't fair that he is choosing on his own. It would be wiser and fairer to go in order."
After the tefillah, he rebuked the gabbai. The gabbai explained to him that he doesn't know the entire picture, and that is why he thinks injustice occurred. He explained that he gave the first aliyah to a young bachur because he was the only kohen in the beis medresh. "The person in the back has yahrzeit, so he got the second aliyah..."
The Chofetz Chaim explained that Hashem runs the world with perfect order, and everything He does is with compassion. If we don't understand, it is because we don't see the entire picture.
The Chofetz Chaim told another mashal of an unlearned person who heard someone say in Ashrei, הרשעים כל ואת אוהביו כל את 'ה שומר, "Hashem protects all who love him and all the wicked..." The man didn't understand. "I understand that Hashem protects the people who love Him, but why does Hashem protect the resha'im?"
Then he heard another person say, כל את ישמיד הרשעים כל ואת אוהביו, "For all those who love Him and all the wicked He will destroy." He didn't understand why Hashem would destroy, chalilah, those who love Him.
But then he heard the entire pasuk, שומר ישמיד הרשעים כל ואת אוהביו כל את 'ה, "Hashem protects all who love Him, and all the wicked He will destroy." Now the pasuk made sense to him.
When we see the world, we don't see the entire picture, and that's the reason we have questions. We only see what happens in this world, but we don't see what happens after one's death, and what happened in previous gilgulim. We see only part of the picture, and therefore we don't understand Hashem's ways. But if we could see the entire picture, we would know that Hashem is just, and all his ways are compassionate and kind.
These ideas are relevant to the difficult times we are living in. There are many things that we don't understand, but it isn't expected that we should understand Hashem's ways. We are not in heaven to see the entire picture, but we believe that everything is only Hashem’s compassion, everything is kindness, and everything is exactly as it should be.
The Ibn Ezra (Devarim 14:1-2) writes that just as children rely on their parents to take care of them in the best way, we are Hashem's children, as it states אלקיכם 'לה אתם בנים, and we should trust that Hashem is leading us with kindness and with compassion. We don't always understand, but like children, we know that it is always good.
