Beans are a starch
Beans are more than that. Beans/legumes/pulses are, as the children’s song suggests, magical (even if they are not fruit).
They can take the place of meat or other proteins, like in a stew/chili/curry, a proteiny topping on rice/pasta, slabs of tofu, or even as a sandwich stuffing (falafel in pita, black bean burger in bun, peanut butter in a sandwich, filling in a burrito).
They can take the place of starch, as in a bean porridge or baked beans in some circumstances.
They can act as a green vegetable, as green beans or edamame or peas.
They can be a handy ready-to-eat snack, like peanuts or wasabi peas.
They’re a sweet filling for desserts, like peanut butter or peanut brittle or whole peanuts in chocolate bars, or Chinese red bean paste, or all sorts of Vietnamese and Thai dishes.
Even on the non-food side of things they’re excellent high protein feed for livestock, green “manure” for nitrogen fixation in soil, and useful for production of various industrial chemicals and materials.