Depends on what the food is.
Generally, your gut has bacteria inside of it. The more consistent your diet, the more acclimated those bacteria become to it. When you change your diet or introduce something new, particularly a radically different plant category or spice, it can disrupt those bacteria, resulting in incontinence and other such things.
Those gut bacteria are actually one of the most important parts of our digestive systems.