וְהָאֱלֹקִים נִסָּה אֶת אַבְרָהָם עִנְיַן הַנִּסָּיוֹן הוּא לְדַעְתִּי בַּעֲבוּר הֱיוֹת מַעֲשֵׂה הָאָדָם רְשׁוּת מֻחְלֶטֶת בְּיָדוֹ, אִם יִרְצֶה יַעֲשֶׂה וְאִם לֹא יִרְצֶה לֹא יַעֲשֶׂה, יִקָּרֵא "נִסָּיוֹן" מִצַּד הַמְּנֻסֶּה, אֲבָל הַמְּנַסֶּה יִתְבָּרַךְ יְצַוֶּה בּוֹ לְהוֹצִיא הַדָּבָר מִן הַכֹּחַ אֶל הַפֹּעַל, לִהְיוֹת לוֹ שְׂכַר מַעֲשֶׂה טוֹב, לֹא שְׂכַר לֵב טוֹב בִּלְבַד. דַּע כִּי הַשֵּׁם צַדִּיק יִבְחָן (תהלים י"א:ה'), כְּשֶׁהוּא יוֹדֵעַ בְּצַדִּיק שֶׁיַּעֲשֶׂה רְצוֹנוֹ וְחָפֵץ לְהַצְדִּיקוֹ יְצַוֶּה אוֹתוֹ בְּנִסָּיוֹן, וְלֹא יִבְחַן אֶת הָרְשָׁעִים אֲשֶׁר לֹא יִשְׁמְעוּ. וְהִנֵּה כָּל הַנִּסְיוֹנוֹת שֶׁבַּתּוֹרָה לְטוֹבַת הַמְּנֻסֶּה: AND G-D TRIED ABRAHAM. The matter of “trial,”364See Rambam’s discussion of this problem, ibid., III, 24. in my opinion, is as follows: Since a man’s deeds are at his absolute free command, to perform them or not to perform them at his will, on the part of one who is tried it is called “a trial.” But on the part of the One, blessed be He, who tries the person, it is a command that the one being tested should bring forth the matter from the potential into actuality so that he may be rewarded for a good deed, not for a good thought alone.
Know further that G-d trieth the righteous,365Psalms 11:5. See also Bereshith Rabbah 34:2. “The Holy One, blessed be He, trieth only the righteous.” for knowing that the righteous will do His will, He desires to make him even more upright, and so He commands him to undertake a test, but He does not try the wicked, who would not obey. Thus all trials in the Torah are for the good of the one who is being tried.