The main function of the ileum is the absorption of digested food products into the bloodstream, so they can be transported to the cells of the body.