Every teacher has their own style.
There is no scientific evidence to prove that writing for punishment negatively affects students desire to write or love to write at a later time. I wrote sentences as a child and essays for punishment. It did not hurt me, it helped me. But the fundamental thing here is that this is a free country and unless writing for punishment is illegal, which it isn't, then this person has the right to do it. You do not have to like it or agree with it, but it is her right.