Apple is from Old English, which means it’s been around pretty much forever. But it didn’t always mean that specific fruit we identify as an apple today. Nope, is used to mean “any kind of fruit.” (Excluding berries, but including nuts, interestingly.) And English isn’t the only language that can claim that. The same was true of the similar words in French, German, Dutch, Norse, Irish, and even Slavonic. That would be why we then get words like pomme de terre in French–“apple of the earth” for potato.
It also explains why the fruit from the Tree of the Knowledge of Good and Evil in the garden has come to be thought of as an apple. Because it was called an apple for hundreds of years–not because people meant that specific rosy-skinned, white-fleshed fruit, but because it simply meant FRUIT!