I am just going to jump in here and say this:
beating on the UKE is almost a right of passage in many schools for the black belt to be. He gets to feel what the technique may really feel like when applied ( be it a punch, throw, etc.). In many schools the UKE knows he is going to get hit (or what ever) hard and he is prepared for it.
Heck he may not like it but I can almost bet that when the day comes that he is demonstrating his uke gets the same treatment if he thinks the uke will someday be a teacher.
It may be an old school tradition that is still being passed down today
That pretty much.
One part of receiving a technique in training is understanding how the technique works and how it feels. You can't always get that without a degree of discomfort -- sometimes to guide you in knowing "too far", sometimes because you just can't do it without a fair degree of force. Let me try an example you might get... I can't teach you a leg sweep without doing some degree of dumping your *** on the ground, unless there's a huge disparity in size. Sure, I can sweep my 5 year old and carry him down -- but someone close to my size? I can't do much more than control the crash a bit. It just won't work unless there's some speed and unbalancing, and when you have that -- there's some thump.
That said -- I do agree there's no need to pointlessly bash your training partners. Most of us have probably worked with someone along the way who tended to seek out the least experienced students to train with -- and go out of their way to bash them. Those guys are just bullies. It's funny; they almost never work with someone who might threaten them...