The villi can increase the surface area in the small intestine for absorption of digested food. As the villi has a thin wall, one cell thick, which can speed up diffusion, and a network of blood capillaries to absorb and transfer nutrients.
And in large intestine, those folds can also increase the surface area for reabsorption of unabsorbed food, mostly water.