Why tomato is considered as a food not vegetable?

Tomatoes are considered both a fruit and a vegetable, depending on the context. Here's why:

Scientifically, tomatoes are fruits. This is because they develop from the flower of the plant and contain seeds. Fruits are the mature ovaries of flowering plants, containing the seeds for reproduction.

Culinarily, tomatoes are often treated as vegetables. This is because they are typically used in savory dishes like salads, sauces, and stews, rather than sweet desserts like other fruits.

The legal definition of a vegetable depends on the country. In the US, the Supreme Court ruled in 1893 that tomatoes are vegetables for the purposes of tariffs, even though they are botanically fruits.

So, the answer is that tomatoes are both a fruit and a vegetable, depending on whether you are talking about their botanical classification, their culinary usage, or their legal definition.