Short answer: we don't know.
Long answer: Appendixes have no known function. There are some theories, but nothing has been proven. It's puzzling, because mostly they just seem to make a few people sick.
The appendix has long been regarded as a vestigal organ (no longer used). Some speculate that the appendix used to help digest cellulose from leafy plants. Since human died doesn't depend on just green leafy stuff any more, it's not needed.
Recently, some theories about the appendix have shown new interest. One researcher, Loren Martin, has found activity in the appendix related to the immune system. However, this hasn't been proven. Another theory put forth by Duke University researchers is that the appendix acts as a resevoir for intestinal flora [the germs that live in our gut and help digest food]. If these bacteria are for some reason killed or flushed out of the intestine, then the appendix can help them grow back.
There are, in fact, a few people who are born without them and they lead perfectly normal and healthy lives. Perhaps in the distant future this will become the norm, but it's likely that the appendix will be around for as long as there are people.