There are different reasons this happens including infection by bacteria or viruses, irritation caused by unfamiliar foods, food allergies, chronic illnesses such as IBD (inflammatory bowel disease) or IBS (irritable bowel syndrome), lactose intolerance, medications, and nervousness.