Does my teacher have any right to do this?

It’s not unfair or abnormal, but I’ve taken a lot of math classes and I haven’t had it happen often.