Humans are a fairly omnivorous species.
We eat roots and tubers, stems and stalks, leaves, flowers, seaweeds, and fungii and call them all vegetables.
We also eat fruits.
Most interestingly, we eat some fruits and call them vegetables†.
A substantial reason for this is the United States Supreme Court decision from 1893 in the matter of Nix v. Hedden. And like all momentous events in the United States, it all comes down to a matter of taxation.
The Tariff Act of 1883 required a tax to be paid on imported vegetables but not fruit. The "intuitive" notion, which of course is not the botanical notion, was that fruits were sweet and were "mostly eaten as is" and vegetables were not and were "cooked".
It all came down to a matter of dueling dictionaries.
Common parlance‡ won and the tomato "became" a vegetable!
† tomatoes, eggplant, bell peppers, chillis, tomatillo, squashes, cucumber, legumes, peas, avocado, corn, okra and olives.
‡ If you really want to freak your vegetarian friends out, when you're eating fruit, be sure to say loudly, "Mmmmmmmmmm ... tasty ripe ovaries!" (because that's what they actually are!)