The Shulhan Aruch (Orah Haim 265) writes that it is customary after a Berit Mila to take the foreskin and place it in some earth, as though "burying" it.
The Lebush (Rav Mordechai Yoffe, 1530-1612) explains this practice based on the notion that whenever a Jew achieves something significant, the Mekatregim – prosecuting angels – try to interfere by arguing that the Jew is unworthy of reward. Thus, for example, on Yom Kippur, the special atonement offerings included the "Sa’ir La’azazel," the goat that was sent into the desert and cast of a cliff, a ritual explained by the Zohar (and the Ramban) as intended to ward off the Satan. As we stand in prayer and repent on this holy day, the Satan comes before G-d to argue that we do not deserve repentance. In order to keep the Satan silent, we symbolically offer him this goat, as a sort of "satanic sacrifice," so that he feels content and ceases his prosecution against the Jewish Nation. Likewise, after a meal, when we feel satiated after partaking of nourishing, enjoyable food, the Satan comes before G-d to argue that we do not deserve this enjoyment and satiation. We therefore wash Mayim Aharonim as though offering the Satan the husks on the fingertips as his share, so-to-speak, in order that he remains silent.
Similarly, the Lebush writes, the Nahash Kadmoni – the snake in Gan Eden – was the first to set out to destroy humankind, by leading Havah to sin. And every time a Berit Mila is performed, the snake – representing the Satan – again attempts to prosecute against the Jewish People. Since the snake was cursed that it would eat earth ("Ve’afar Tochal Kol Yemeh Hayecha"), we put the foreskin in the earth, as if giving the snake its share, so-to-speak, so it will desist and cease its efforts to prosecute against us before the Heavenly Throne.
This demonstrates the point that there is great depth and profundity to each and every one of our cherished customs and traditions. Even those practices which might at first appear strange to us, and do not seem rational, are in fact rooted in very deep and meaningful concepts, and must therefore be strictly adhered to and meticulously observed.