While some may get it worse than others, there is one main reason beans cause gas. "Legumes contain unabsorbed short-chain carbohydrates called galacto-oligosaccharide (GOS) and fructans. These poorly absorbed sugars are rapidly fermented by gut bacteria in the large bowel, resulting in gas.