There’s often confusion over whether the tomato is a fruit or vegetable. Even though the tomato is a fruit, it is usually treated like a vegetable by chefs.
The reason the tomato is technically a fruit is because it contains seeds. Vegetables do not contain seeds. Guess what? Because of their seeds, cucumbers and squash are fruits as well!
Here’s a good explanation about the confusion from AskOxford.com:
The confusion about ‘fruit’ and ‘vegetable’ arises because of the differences in usage between scientists and cooks. Scientifically speaking, a tomato is definitely a fruit. True fruits are developed from the ovary in the base of the flower, and contain the seeds of the plant (though cultivated forms may be seedless) … As far as cooking is concerned, some things which are strictly fruits may be called ‘vegetables’ because they are used in savoury rather than sweet cooking.