Because זאת only means "this". זה can mean "this" (male and singular) but can also be used as a copula, and then it is used with anything, male, female, plural or single. You could use a gender and number specific copula, עגבניה היא לא תות.
Either way is fine, since the rules of spelling without nikkud are not very strict in real life, and both versions are rather common. According to the Hebrew Academy it should be עגבנייה (one 'י for the 'i' vowel and one 'י for the 'y' consonant).