Why are tomatoes called tomatoes when they are not eggplants?

Chinese people are accustomed to adding the word "fan" to things introduced from abroad, so they call it "tomato", also called "fan persimmon". However, because its color is red and it comes from the West, it also has "tomato". Because the name of tomatoes is easy to remember and write, the name of tomatoes is more widely spread than "tomato" and "persimmon".