Last December, researchers published a novel explanation in The Journal of Theoretical Biology. The appendix, they suggest, is a “safe house” for commensal bacteria, the symbiotic germs that aid digestion and help protect against disease-causing germs.
Structurally, the appendix is isolated from the rest of the gut, with an opening smaller than a pencil lead, protected from the fecal stream that might be carrying pathogens. In times of trouble like a diarrheal infection that flushes the system, these commensal bacteria could hide out there, ready to repopulate the gut when the coast is clear.