Fruit versus vegetable
Tomatoes are considered a fruit or vegetable depending on context. According to Encyclopedia Britannica, tomatoes are a fruit labeled in grocery stores as a vegetable due to (the taste) and nutritional purposes.
Botanically, a tomato is a fruit, a berry, consisting of the ovary, together with its seeds, of a flowering plant. However, the tomato has a much lower sugar content than other edible fruits, and is therefore not as sweet. Typically served as part of a salad or main course of a meal, rather than at dessert, it is, in the US, considered a “culinary vegetable”.
One exception is that tomatoes are treated as a fruit in home canning practices: they are acidic enough to process in a water bath rather than a pressure cooker as vegetables require.
Tomatoes are not the only food source with this ambiguity: bell peppers, cucumbers, green beans, eggplants, avocados, and squashes of all kinds (such as zucchini and pumpkins) are all botanically fruits, yet cooked as vegetables. This has led to legal dispute in the United States. In 1887, US tariff laws that imposed a duty on vegetables, but not on fruits, caused the tomato’s status to become a matter of legal importance. The US Supreme Court settled this controversy on 10 May 1893, by declaring that the tomato is a vegetable, based on the popular definition that classifies vegetables by use, that they are generally served with dinner and not dessert (Nix v. Hedden (149 U.S. 304)). The holding of this case applies only to the interpretation of the Tariff Act of 3 March 1883, and the court did not purport to reclassify the tomato for botanical or other purposes.