Beans also have a non-trivial amount of protein, and a significant amount of the carbohydrate content is fiber. But even without taking that into account, I’d say that complex carbohydrates (like beans) are much healthier from a metabolic point of view — because your body works harder to extract their energy, and the energy is delivered over a longer period time. Add the fact that beans are often prepared with a fat, and it becomes clear why in many part of the worlds the majority of the diet is some variation of rice & beans. Thanks for reading!