It seems that this text suggests that every individual is wearing earrings. Although this is probably not true, this shows us that the Israelites are unified in thought and action in regard to their feelings of oppression. When the people remove their earrings, they are leaving a hole in their ears. The hole in the ear is a physical indication of a slave's decision to remain enslaved. The Israelites forfeit their mental freedom and pledge themselves to God. The creation of the golden calf is act of immaturity that shows God that the people are not prepared to be independent or self sufficient.
This gold was made into earrings at some point in between the exodus from Egypt and the golden calf.
Rashi explains the connection between the doorpost a slave's ear is pierced against and the doorpost from the exodus of Egypt.
ורצע אדניו את אזנו במרצע AND HIS LORD SHALL BORE HIS EAR THROUGH WITH THE AWL — “His ear” means his right ear. Or perhaps this is not so, but Scripture means his left ear? Scripture however uses the term אזן here and it uses אזן in another passage, thereby suggesting an analogy based upon verbal similarity; viz., here it is said “and his lord shall bore his ear (אזנו) through”, and of the leper it is said, (Leviticus 14:25) “and the priest shall put it upon the tip of the right ear (אזנו הימית) of him that is to be cleansed”. — How is it in that latter passage? It is the right ear! So here, too, it is the right ear. — What is the reason that the ear had to be pierced rather than any other limb of the servant’s body? Rabban Jochanan ben Zaccai said: That ear which heard on Mount Sinai, (Exodus 20:13) “Thou shalt not steal” and yet its owner went and stole and was therefore sold as a slave — let it be pierced! Or, in the case of him who sold himself from destitution, having committed no theft, the reason is: That ear which heard on Mount Sinai what I said, (Leviticus 25:55) “For unto Me the children Israel are servants” and yet its owner went and procured for himself another master — let it be pierced! (Mekhilta d'Rabbi Yishmael 21:6:3; Kiddushin 22b). Rabbi Simeon interpreted this verse like a jewel (i. e. giving it an ethical signification): In what respect are door and doorpost different from all other objects in the house that they should be singled out for this purpose? God, in effect, said: door and doorpost that were eye-witnesses in Egypt when I passed over the lintel and the two doorposts, freeing Israel from slavery, and when I said, (Leviticus 25:55) “For unto Me the children of Israel are servants” — servants to Me but not servants of servants (of human beings), and yet this man went and procured another master for himself — let him be pieced in their presence (i. e. let them be eye-witnesses now when this man voluntarily prolongs his state of slavery)! (Kiddushin 22b.)
According to Rabban Yohanan ben Zakkai, the ear is significant because God was heard from Mount Sinai when God said, "