Professional health care may ask you to provide a stool sample to help them diagnose or rule out a specific health condition. Stool contains bacteria and other substances in the digestive system. By testing the content of these substances and bacteria in the feces, they can understand what is happening in the digestive system.