A fruit — a ‘true fruit’ — is one where all tissues are derived from the plant ovary and this alone. This includes peas. Whereas strawberries, for example, also include some of the flesh from the peg that holds the ovary, disqualifying them from fruit status. The apple gets its carpels involved as well as the ovary, leading to a kinky pome. ‘True berries’ are also ‘true fruits’, but not the other way round. Grapes, currants (red and black), elder- and gooseberries are all proper upstanding berries which will not deceive you or smuggle themselves into your house in pies before stealing your silver while you sleep.
So why call it a fruit when it isn’t? To most of us, knowing the particulars isn’t all that important in the grand scheme of things, though this sort of knowledge is possibly useful for the aspiring lawyer-type child, looking for a loophole to not eat their tomatoes and bell peppers after being admonished to eat their vegetables. We’re after the first-order approximation here, not the more detailed solution. I don’t particularly care if it’s not really a fruit, but it’s actually a fruit wrapped inside a mystery, with little enigmas on the outside — I want to throw it into a category and forget it. Is it a fruit or a vegetable? “False dichotomy” is not an acceptable answer for a non-biologist (or even for a pedant who’s off-duty)
Sweet edible plant matter = fruit.
Savory edible plant matter = vegetable.
This is the application of anti-stamp-collecting science ideas to places where it shouldn’t be. Fruits and vegetables are defined by their place on either a list of fruits or a list of vegetables that are defined by people in a culture. There might be commonalities on each list, like fruits are sweet, but the key thing is that generally people agree the items should be where they are. Nothing else. Trying to force things to conform to some generalized rule doesn’t work when the real rule is as I have given.
Logomachy at it’s finest.