> But how is the teacher supposed to know that you are just that smart?
For starters, notice that some kids are doing whole lesson's worth of material in the first 15 minutes and figure out that they have no reason to be at this lesson.
The hard question, to which I don't claim to know a silver bullet answer, is where should they be instead. Recognizing who is wasting their time at school isn't that difficult if you spend several hours per week with those kids.