The child grew and he was weaned. Avraham made a great feast on the day Yitzchak was weaned. (Bereishis 21:8)
The simple understanding of this posuk is that Avraham made a feast on the day that Yitzchak was weaned, which occurred at the age of two. This is the time when a child attains a level of physical independence, where it does not need to be fed by its mother.
The Midrash offers another interpretation. Avraham made a feast on the day that Yitzchak had the bris mila. This is derived from the end of the word hi'ga"male." Male is translated as circumcision. The mefarshim add that the first two letters of the word higamale are hey and gimal which have the numerical value of eight. Taken together, this word tells us that on the eighth day he was circumcised.
How can the Midrash interpret that the feast was on the day of mila when the simple interpretation of the posuk is that the feast took place on the day of weaning?
The answer is that the Midrash interprets the posuk as follows: Avraham made a big party on the day of weaning "just like" the party he made on the day of mila. The posuk concludes with the words "bi'yom hi'gamel es Yitzchak," which are translated literally as "the day he circumcised Yitzchak." We must interpret the posuk, however, as if there was an added chaf, Ki'Biyom higamal es Yitzchak. Now the posuk in its entirety reads: "Yitzchak grew and was weaned. Avraham now at this point made a feast, just like the feast he made almost two years earlier when his son Yitzchak had his bris mila." There are other examples in tanach were we find a posuk interpreted as if there was an extra chaf added. See, e.g., Jeremiah 2:3 ("kodosh Yisrael LeHashem, raishis tevuaso" is interpreted as if the posuk read kraishis tevuaso).
This posuk is often quoted as a source for the obligation to celebrate a bris mila with a lavish feast. It is surprising that according to our interpretation we only know this indirectly. The posuk informs us that the feast of weaning was like the feast of mila. If the Torah wanted to give us a source to celebrate a bris mila with a lavish feast, why did it not do so directly by recording the actual feast that took place at the time of mila?
Perhaps the answer is that by connecting the feast of mila to the feast of weaning the Torah is not only giving us a source for this celebration, but is also giving us the reason for the celebration of mila.
To explain this, we need to introduce three points. First, it is common for the Torah to describe spiritual attainments or accomplishments in physical terms. Second, when a child is weaned we understand the reason for celebration. The child has gained a level of physical independence. It is now able to eat on its own. It is no longer completely dependent upon its mother for survival. Attainment of physical independence is a great milestone for a human being and certainly a good reason to celebrate. Third, the mefarshim explain that one of the reasons Hashem commands us to perform bris mila is that he desires that we should "free" ourselves from our base desires. The foreskin represents the barrier that prevents a person from overcoming his base physical desires. By removing the foreskin, we remove this barrier and achieve mastery over ourselves. Mila gives us a message and goal for life: achieve moral freedom to do Hashem's will.
Putting these three points together, we can now understand why the Torah linked the feast of circumcision with the feast of weaning. The Torah is teaching us that just as we understand in physical terms the reason for celebrating when a child is weaned, we should also understand the reason for feasting at a circumcision. This is also a celebration of independence, albeit a spiritual one.