Oligosaccharides in beans make it all the way to the large intestine undigested. It is the bacteria in the intestine that finally breaks down these sugars. Doing so causes fermentation and the production of gas that we release as flatulence.