Well, it depends on who you ask.
If you ask a court, they might decide otherwise.
In 1893, the Supreme Court declared tomatoes to be vegetables. In Nix v. Hedden, a fruit importer challenged the Port of New York’s classification of tomatoes as vegetables, which unlike fruits, were subject to a 10% excise tax.
“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, whether sellers or consumers of provisions, 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. … As an article of food on our tables, whether baked or boiled, or forming the basis of soup, they are used as a vegetable, as well when ripe as when green. This is the principal use to which they are put. Beyond the common knowledge which we have on this subject, very little evidence is necessary, or can be produced.”
h/t to Nikki for this fun fact!