From Wikipedia..........
Immune function
Loren G. Martin, a professor of physiology at Oklahoma State University, argues that the appendix has a function in fetuses and adults.[7] Endocrine cells have been found in the appendix of 11-week-old fetuses that contribute to "biological control (homeostatic) mechanisms." In adults, Martin argues that the appendix acts as a lymphatic organ. The appendix is experimentally verified as being rich in infection-fighting lymphoid cells, suggesting that it might play a role in the immune system. Zahid[8] suggests that it plays a role in both manufacturing hormones in fetal development as well as functioning to "train" the immune system, exposing the body to antigens so that it can produce antibodies. He notes that doctors in the last decade have stopped removing the appendix during other surgical procedures as a routine precaution, because it can be successfully transplanted into the urinary tract to rebuild a sphincter muscle and reconstruct a functional bladder.[9]
Maintaining gut flora
Possible function of the human vermiform appendix as a "safe house" for beneficial bacteria in the recovery from diarrhea.
Although it was long accepted that the immune tissue, called gut associated lymphoid tissue, surrounding the appendix and elsewhere in the gut carries out a number of important functions, explanations were lacking for the distinctive shape of the appendix and its apparent lack of importance as judged by an absence of side effects following appendectomy.[10]
William Parker, Randy Bollinger, and colleagues at Duke University proposed that the appendix serves as a haven for useful bacteria when illness flushes those bacteria from the rest of the intestines.[9][11] This proposal is based on a new understanding of how the immune system supports the growth of beneficial intestinal bacteria,[12][13] in combination with many well-known features of the appendix, including its architecture, its location just below the normal one-way flow of food and germs in the large intestine, and its association with copious amounts of immune tissue. Research performed at Winthrop University-Hospital showed that individuals without an appendix were four times more likely to have a recurrence of Clostridium difficile.[14] However, other research showed that there is a greater rate of C. difficile infection among people with an appendix than those without.[15]