Why This Question Confuses So Many People

The confusion comes from the difference between culinary definitions and scientific definitions.
In the kitchen, foods are often categorized based on how they taste and how they are used in recipes.
Sweet foods are usually called fruits.
Savory foods are often called vegetables.
By that standard, tomatoes are commonly treated as vegetables.
In science, however, classification is based on plant structure and reproduction. Since tomatoes contain seeds and develop from flowers, they are fruits regardless of how they taste.
Final Challenge
Now that you know the answer, here’s another question: