This verse is a great example of how two different Greek words are mistranslated as the same English word. The "good" tree and "good" fruit are described by two different Greek words translated as "good." The "bad" tree and the "bad" fruit have two different Greek words translated as "bad." When Jesus uses four different words perhaps English translations should reflect that. Interestingly, this particular mistranslation goes back to the Latin Vulgate.
In Jesus's words, there was a difference between the defects of the tree and the defects of the fruit. There is also a clear economic meaning to this verse that is lost in translation. The most common word translated in the Bible as "good" applies to the tree, but it means "beneficial" and "valuable." The most common word translated in the Bible "evil" applies to the "fruit," but it means "worthless" and "worth less." The less common word for the "good" applies to the fruit and means "fine" more in the sense of "good." The word translated as "corrupt/bad" that applies to the tree has more of a sense of "diseased" and "worn-out." The Greek word that more clearly means "evil" or "bad" is not used in this verse. See this article of more information on the words for "good" and "evil".
This verse is also a good and useful example of why the Greek verb usually translated as "to do" is often better translated by its primary meaning of "make" and "produce." The sense is often very economic. Of course, you cannot see this because it is translated as "brings forth" and "bears" here.