The appendix has a high concentration of immune tissue, so it’s acting to help the immune system fight any bad things in the gut. During times of gastrointestinal distress - you know, a diarrhea episode where all of your good gut bacteria is getting kind of flushed out of the system - the appendix is kind of this blind tube with a very narrow diameter and narrow lumen, so the good bacteria doesn’t get flushed out of the appendix. People are looking into antibiotics and other ways of treating appendicitis without completely removing it, given the evidence that is accumulating that it is in fact helpful for your health to have an appendix.

Source: The appendix plays a hidden role in gut health