"And it came to pass after these things" (Genesis 22:1). Everywhere that "after" is stated, it is set apart. What is "after"? That the angels said to the Holy One, blessed be He: This Abraham, You graced him with a son at one hundred years, and he made a great feast on the day Isaac was weaned, yet he did not have to offer before You a single turtledove or a young pigeon. The Holy One, blessed be He, said to them: If I were to tell him to offer up his son before Me, he would offer him. Therefore it is written, "And God tested Abraham." Another interpretation: That Ishmael said to Isaac: I am greater than you, for I received circumcision when I was thirteen years old, and it was in my power to protest, yet I did not protest; but you, when you received the circumcision, were eight days old, and you had no strength to protest, and therefore you did not protest. Isaac said to him: With one limb you make me afraid? Were the Holy One, blessed be His name, to say to me that I should offer up myself, I would offer it and I would not refuse. Therefore it is said, "And God tested Abraham."
Why God Tested Abraham at the Binding of Isaac
Midrash Aggadah, Genesis 22:1
ויהי אחר הדברים האלה. כל מקום שנא' אחר מופלג. מאי אחר, שאמרו המלאכים להקב"ה אברהם זה חננתו בן לבן מאה שנה, ועשה סעודה גדולה ביום הגמל את יצחק, לא היה לו להקריב לפניך תור אחד או בן יונה, אמר להם הקב"ה אם אני אומר לו שיהיה מקריב בנו לפני הוא היה מקריבו, לכך כתיב והאלהים נסה את אברהם: ד"א שאמר ישמעאל ליצחק אני גדול ממך שאני קבלתי מילה ואני בן י"ג שנה והיה בידי למחות ולא מחיתי, ואתה כשקבלת המילה היית בן שמונה ימים, ולא היה בך כח למחות, לכך לא מחית, אמר לו יצחק על אבר אחד אתה מייראני, אילו אמר לי הקב"ה ברוך שמו שאקריב את עצמי הייתי מקריב ולא הייתי מסרב, לכך נאמר והאלהים נסה את אברהם: