Tanach · Rishonim on Tanach · Sforno · Torah
Sforno on Numbers 25:4/ספורנו על במדבר כ״ה:ד׳
אנֶגֶד הַשָּׁמֶשׁ. שֶׁיִּרְאוּ הָעָם אֶת הֲרִיגַת עוֹבְדֵי עֲבוֹדָה זָרָה וְלֹא יִמְחוּ, וּבָזֶה יְכֻפַּר לָהֶם עַל שֶׁלֹּא מִחוּ בַּפּוֹשְׁעִים.
1נגד השמש, so that the people would observe the execution of the idolaters and by not protesting their punishment achieve atonement. This would help them achieve atonement for having sinned by not protesting the sinners’ conduct beforehand.