The function of the appendix in apes is the digestion of vegetable matter such as leaves. Humans do not digest leaves, but we inherited some of the apes' vegetarian apparatus. Our appendix is much smaller than that of present-day apes, and for some reason our immune system does not serve it well. An infection there is not eliminated as it might be elsewhere in the body.