Why do you break a glass at a wedding and not something else like a plate at an engagement and perhaps something really valuable? And why exactly does the Chatan break the glass by his leg? Why not smash it with a shot from above like the plate at the engagement?
The Gemara in Brachos 30b relates the story of Mar.
Mar, son of Ravina, made a wedding feast for his son and he saw the Sages, who were excessively joyous. He brought a valuable cup worth four hundred zuz and broke it before them and they became sad.
From this, the Tosfos explains that it became a minhag to do it on every wedding, till this very day.
Tosfos (sv. ד"ה אייתי כסא דזוגיתא חיורתא) says:
HE BOUGHT A CUP OF WHITE GLASS. The Gemara relates that at the wedding of Rav Ashee’s son, Rav Ashee saw that the students were getting a bit too happy. He brought a very expensive cup and broke it in front of them in order to stem the overflow of happiness. From here, it became customary to break a cup at a wedding. This custom remains with us till today
The DafDigest of this Gemara explains this concept further:
When the Temple stood one needed to similarly moderate his joviality to prevent misbehavior. Interestingly some Rishonim understand the cause of the prohibition to be due to the vulnerability to lightheadedness and licentiousness associated with merriment.
The Meiri appears to maintain both views. He explains that due to the danger of overexcitement, one had to temper one’s joviality. However, when it came to matters of Mitzvah, then one could permit the elation to overpower him. Though, after the destruction of the Temple, one can’t allow himself to be overwhelmed by joyfulness, even for matters of Mitzvah.
The Kol Bo, however, interprets this slightly different. He writes:
The broken glass represents the wreckage of our past glory, and the destruction of the ancient Temple in Jerusalem in the first century. It recalls, at the most joyous and momentous occasion of the life cycle, that there is a continuing national sadness. It is a memory of Zion that stands as a reminder that in life great joy can be cancelled by sudden grief. It enriches the quality of joy by making it more thoughtful and by inspiring gratitude for the goodness of G‑d.
The article on Chabad.org elaborates further:
Perhaps a deeper significance can be realized if, as the groom’s action recalls the demolished house of G‑d, the now-married couple takes it as an obligation upon themselves to rebuild the Temple in their own lives by building their own Jewish home, as every synagogue is a mikdash meat, a miniature temple. The Sages say that all that is left of the Temple today are dalet amot shel Halakhah, (the four ells of Torah law). If the home we build will house the spirit and practice of these four ells, we will have contributed to the rebuilding of the Temple in our own way and in our own homes.
The Mishnah Berurah (Siman 560) says it serves as an reminder for proper behaviour.
Why with the leg/foot?
The Rabbeinu Bahya is quoted in explaining why especially the foot is chosen for this ceremony.
Rabbi Bachya traces this custom, as so many other marriage customs, to the revelation on Sinai. What joy is greater than the wedding, in the private lives of this bride and groom? What joy is greater in the religious lives of the people Israel than the simchat Torah, the exquisite moment at Sinai? At Sinai, there was the tragic breaking of the tablets of the commandments at the foot of the mountain; at the wedding simchah there is a symbolic breaking of the glass under foot. Every new family helps repair the breach at Sinai— the breaking, in joy, at every wedding overcomes the breaking of the tablets.
See also what the Shaloh HaKodesh writes.