Legumes have nothing to do with fruits or vegetables
Legumes means they are able to fix atmospheric nitrogen and don't need nitrogen from the soil
Quote:
A legume (/ˈlɛɡjuːm/ or /ˌləˈɡjuːm/) is a plant in the family Fabaceae (or Leguminosae), or the fruit or seed of such a plant.Legumes are grown agriculturally, primarily for their food grain seed (example beans and lentils, or generally pulse), for livestock forage and silage, and as soil-enhancing green manure. Legumes are notable in that most of them have symbiotic nitrogen-fixing bacteria in structures called root nodules. Well-known legumes include alfalfa, clover, peas, beans, lentils, lupins, mesquite, carob, soybeans, peanuts and tamarind.
A legume fruit is a simple dry fruit that develops from a simple carpel and usually dehisces (opens along a seam) on two sides. A common name for this type of fruit is a pod, although the term "pod" is also applied to a few other fruit types, such as that of vanilla (a capsule) and of radish (a silique).