In modern English, most people use "vegetable" with its current culinary meaning.
In earlier centuries, "vegetable" still had mostly its original meaning taken from Latin, where "Vegetabilia", as used e.g. by Linnaeus for the "vegetabile regnum", referred to any living beings capable of growth, but incapable of motion, i.e. mainly to the terrestrial plants.
Strictly speaking, seeds, grains, nuts, fruits, roots, bulbs, leaves, stems, etc. are all parts of vegetables.
What in English is now called "vegetables" corresponds to the Latin word "holera", whose original meaning was "greens", and not at all with the Latin word "vegetabilia". Also English "fruits" does not correspond with Latin "fructa", but with Latin "poma". Latin "fructa" referred to the useful results of some activity, a sense still encountered more rarely in English.
This old sense is encountered, like in your example, but much more often "fruits" is used in the culinary sense.
Many people perceive your example as a metaphor, the results of the labor being compared with the fruits of a tree, but in reality the direction of the metaphor has historically been opposite, the fruits of the tree being called thus because they were considered the useful results of its cultivation.
In earlier centuries, "vegetable" still had mostly its original meaning taken from Latin, where "Vegetabilia", as used e.g. by Linnaeus for the "vegetabile regnum", referred to any living beings capable of growth, but incapable of motion, i.e. mainly to the terrestrial plants.
Strictly speaking, seeds, grains, nuts, fruits, roots, bulbs, leaves, stems, etc. are all parts of vegetables.
What in English is now called "vegetables" corresponds to the Latin word "holera", whose original meaning was "greens", and not at all with the Latin word "vegetabilia". Also English "fruits" does not correspond with Latin "fructa", but with Latin "poma". Latin "fructa" referred to the useful results of some activity, a sense still encountered more rarely in English.