Some illnesses are spread through water contamination. Microorganisms that cause these diseases frequently affect the digestive tract, causing diarrhea. This is a beneficial adaptation for the pathogen because

the pathogen can spread more easily, especially in areas with poor sanitation
the pathogen can survive only on contaminated meat or seafood, reducing its ability to spread
the immune system can more easily fight off symptoms once the body gets rid of the pathogen
the immune system benefits from deadly pathogens entering the body from unwashed fruits and vegetables