There are many theories behind the giving of apples to the teacher. One is that long years ago, teachers were not paid very much in the way of wages and the children’s parents were mostly farmers who would send apples to the teachers in appreciation and for compensation for teaching their children.
Apples are a great source of vitimins and minerals and one can feel refreshed after have eaten an apple, making it the perfect mid-day snack or perhaps a special treat for the kids to be able to stay focused on their learning.
Another theory is that it represents the story of Adam and Eve and the apple from the tree of knowledge. It could be because of the old saying An apple a day keeps the doctor away, it could be because the student wants to be the apple of the teachers eye and make good grades, sort of like a bribe, this one I really doubt is true, but who knows.