The morphological and functional design of gastrointestinal tracts of many vertebrates and invertebrates can be explained largely by the interaction between diet chemical constituents and principles of economic design, both of which are embodied in chemical reactor models of gut function. Natural selection seems to have led to the expression of digestive features that approximately match digestive capacities with dietary loads while exhibiting relatively modest excess. Mechanisms explaining differences in hydrolase activity between populations and species include gene copy number variations and single-nucleotide polymorphisms. In many animals, both transcriptional adjustment and posttranscriptional adjustment mediate phenotypic flexibility in the expression of intestinal hydrolases and transporters in response to dietary signals. Digestive performance of animals depends also on their gastrointestinal microbiome. The microbiome seems to be characterized by large beta diversity among hosts and by a common core metagenome and seems to differ flexibly among animals with different diets.