The explanation lies in the two different ways that "fruit" is defined. First, it is true that scientifically speaking, tomatoes are fruits.
According to Merriam-Webster, a fruit is "the usually edible reproductive body of a seed plant." In a blog post, the dictionary explained it in simpler terms: "Any thing that grows on a plant and is the means by which that plant gets its seeds out into the world is a fruit."
That definition includes apples, tomatoes, and anything else that grows from a plant and contains seeds. (Cucumbers, peppers, pumpkins, and avocados are all fruits too, according to science.)
Vegetables, on the other hand, have a slightly murkier definition. It's a word we use to group together a wide range of plants whose parts are edible and herbaceous, like roots, stems, and leaves. The critical distinction is that, according to the dictionary, a vegetable must be part of a plant or the whole plant itself, while fruits are just the means by which certain plants spread their seeds.
"The thing a tomato plant produces isn't a part of the plant itself, any more than the egg a chicken lays is part of the chicken, or the apple is part of the tree on which it grew," Merriam-Websterwrote.
But the confusion arises because "vegetable" isn't a botanical classification so much as it is a culinary one. And "fruit" can be a culinary term, too — described as "having a sweet pulp associated with the seed" and "used chiefly in a dessert or sweet course," according to Merriam-Webster. So scientifically, fruits don't have to be sweet, but in the kitchen, most people would classify the fruits that fall on the savory side, like tomatoes, as vegetables.
Nutritionists recognize the terms as they are commonly used, and tomatoes are listed as a vegetable under USDA guidelines.
Even the Supreme Court has weighed in on the issue.
"Botanically speaking, tomatoes are the fruit of a vine, just as are cucumbers, squashes, beans, and peas. But in the common language of the people … all these are vegetables which are grown in kitchen gardens, and which, whether eaten cooked or raw, are, like potatoes, carrots, parsnips, turnips, beets, cauliflower, cabbage, celery, and lettuce, usually served at dinner in, with, or after the soup, fish, or meats which constitute the principal part of the repast, and not, like fruits generally, as dessert."