The reason beans actually give you gas is because of sugar found in beans called oligosaccharide that the body cannot fully break down. When these sugars move into the small intestine, they produce excess gas.