When I did biology degree a while back the thinking was it contained enzymes to break down cellulose (which we cannot now eg sweetcorn) but was lost in natural selection as our diets grew much more meet based and a lot less fibrous cellulose. Some animals still have a similar organ to the appendix and theirs still contain the enzymes as their diet remained mostly plant based.