The Lancet has a fascinating article on the medically observed phenomenon of people including foreign objects into their bodies:

The term foreign body, as applied to a substance of external origin present within the human body, seems to have entered medical language in the middle of the 18th century. The number of texts on the topic rapidly increased until 1880, followed by another peak around 1918. Often articles described techniques for the removal of such objects, the development of which certainly seems to have been a key point of interest in the early 20th century.

In the early 20th century, discussion of foreign bodies also became closely associated with new psychological approaches to mental functioning, such as Freudian psychoanalysis or the work of psychiatrist Pierre Janet. Indeed, Freud and Josef Breuer even used the analogy of the foreign body to explain hysteria, suggesting that “psychical trauma…acts like a foreign body which long after its entry must continue to be regarded as an agent that is still at work”.
Thus, in surgical writings, the foreign body became something from which psychological meaning could be drawn. In 1913, William Clayton-Green puzzled: “Did hair-swallowers desire to do something which others abhorred? Or did they wish to excite wonder and interest and to puzzle their doctors? Or was hair-swallowing a form of psychical tic, occurring in mentally abnormal subjects?” He and his contemporaries struggled to answer such questions. This new interest in a psychological model of the foreign body is also apparent in the case of a young woman, Beatrice A, admitted repeatedly to the Royal London Hospital between 1898 and 1909 for the removal of hairpins inserted into her bladder. On her first admission, the young milliner was described as “[m]ad as a hatter”. Yet, by 1909, this conclusion did not seem so obvious. Beatrice’s actions were now referred to as a “habit”, and it was noted that no other symptoms of insanity had been observed. Beatrice herself informed the surgeon “that she formerly suffered from an impulse to throw herself out [of] windows [and] once did it. Many years ago however she gave this up for the now harmless amusement of putting hairpins into her bladder.” This unusual explanation appears to have perturbed Beatrice’s surgeons, located as it was somewhere between the rational and the irrational: inserting hairpins did indeed seem less dangerous than falling from a height, but why might she need to do either? Thus articles in the next few decades debated the psychological meaning of foreign bodies, with a wide array of possible explanations suggested from hysteria to malingering, sexual perversion, and “professional swallowing”.