so, what foods cause gas and bloating? legumes (beans, peas, lentils, chickpeas, broad beans) are at the top of the list of foods that cause bloating. the reason for this is raffinose, a complex carbohydrate composed of glucose, fructose, and galactose.