...צַדִּיק וְיָשָר הוּא [דברים לב:ד]
The Ohr HaChaim HaKadosh (Ha’azinu 32:4) asks the following question: Hashem created the world with justice, as it is written, “With the law He will establish the land” (Mishlei 29:4). And Chazal taught that Hashem took an oath that He will establish the world based on [His] justice. Yet we find that He has 13 attributes of mercy. Now if Hashem swore that He will run the world based on His justice, where is there room for the 13 attributes of mercy?
The Ohr HaChaim answers that two events take place: din and ma’aseh (judgement and action) – i.e., at first, Hashem judges a person’s actions (din) and then, He delivers the outcome of this judgement (ma’aseh). At the din stage, Hashem judges using laws of justice (as He swore when He created the world), but at the ma’aseh stage, when Hashem comes to bring about the outcome of that judgement, Hashem uses the 13 attributes of Mercy. And that’s the meaning says Ohr HaChaim of the words in our parsha (Haazinu, Devorim 32:4) צַדִּיק וְיָשָר הוּא. Namely, in the beginning, Hashem is צַדִּיק - just according the law, but afterwards, Hashem is יָשָר - going beyond the letter of the law.
A mashal that can be used to understand this is the function of the atmosphere. The sun rays are very powerful and would have made life on earth impossible. Hence, Hashem created the atmosphere that “filters” those rays so that when they actually reach us, they are beneficial. The rays leaving the sun is the mashal for the din – the judgment that resulted based on the just law, and the atmosphere is the mashal for 13 attributes of Hashem’s mercy – they “filter” the din.
So how do we activate this “filter”? There are (at least) two ways by which we can achieve this. The Ohr HaChaim (ibid.) teaches when a person beseeches HaKadosh Boruch Hu to have mercy upon him (e.g., for refuah, parnasa, shiduchim, children, etc.), then Hashem uses His 13 attributes of mercy to alter the original din. The Tomer Devorah (ch. 1) teaches that when a person himself interacts with his fellow Jews using 13 attributes of mercy (e.g., being tolerant, forgiving, etc.) then he causes Hashem’s 13 attributes of mercy to shine in the world.
