I was sometimes told to do this as a child, too. And I hated it. I hated many things about school, so if that had been the extent of the problems with the practice, it wouldn't have mattered much. It wasn't.
From my perspective, helping other students was extra work that no one else was required to do, so it was unfair to single me out and force only me to do it. When other students finished, they got to either quietly amuse themselves with a book or just sit there with their own thoughts. I would have greatly preferred to do either of those things, just like everyone else was allowed to. But from my perspective, I was being punished by being treated differently, which made me suspect that understanding the material better than most of my peers was a bad thing. As a strong introvert, being stuck in a room with 20+ other people all day was hard enough, and all I wanted was a few precious minutes where I wasn't required to interact with anyone. But I wasn't allowed to do that until whomever I was supposed to be helping had finished. I couldn't wave some magic wand and make them understand these concepts - if the teacher couldn't make them understand it, why would I be able to? And I wasn't allowed to just do it for them, so the end result was that I rarely got the same amount of free time most of the other children got. Depriving me - and only me - of those little slivers of downtime just seemed sadistic.
Naturally, I resented this. It didn't teach me empathy or compassion - it did the opposite. If other students' academic success hadn't been linked to my own treatment in this way, I wouldn't have felt anything negative toward them. But because I was being punished for what I perceived as their shortcomings, I was effectively being trained to view them as bad, harmful, and toxic. Their very existence was an affront to me, because so long as they were there, I could never be treated fairly.
I grew to hate them on a personal level, and I made that clear, loudly and often. Doing that enough times usually got me removed from involuntary TA duties, which was all I'd wanted in the first place. So of course, it did nothing at all to impress upon me why that conduct was wrong. I'm sure many people tried to explain it, but no amount of lectures or explanations will erase the simple equation of "bad behaviour = getting what I want" from the mind of a child who's just done exactly that. Year after year, teachers would try to make me do this, and year after year, I'd eventually get out of it by saying horrible things that made the other child cry. Sometimes it took a while, and the other child did a lot of crying before we were finally rid of each other.
I deeply regret many of the things I said and did to the classmates I'd been taught to resent. As an adult, it's apparent in hindsight that many of them had terrible home lives, drug-addicted parents, or undiagnosed learning or emotional disorders. Some others simply weren't very smart, but that's not a character flaw, and it's deserving of compassion rather than scorn. I understood none of those things as a child, because I was a child and not a trained teacher. If this was actually a misguided attempt to teach me anything, my poor classmates certainly paid the price for it.