I believe even majority of the teachers who grant this punishment to their students do not know the reason behind it. This form of punishment has been in practice in our country since the Gurukul time and was given to the students who were weak in studies. That is a different question if now a days teachers grant this punishment for any mistake and not only for studies but originally it was meant for weak students only.
Talking about the logic behind this punishment, it is very interesting to know that this particular posture increases the blood flow in the memory cells in brain and synchronizes the right and left side of the brain to improve function and promote calmness, stimulates neural pathways via acupressure points in the earlobe, sharpens intelligence and also helps those with autism, asperger’s syndrome, learning difficulties and behavioral problems. Probably we have forgotten this ancient method of increasing memory power but the West is now using is very diligently and they are recommending this posture or exercise to treat many a diseases.