The teacher probably just didn't like the girl, maybe for good reason, maybe not. Teachers are supposed to set a good example for their students by acting like adults, but they're capable of pettiness, too. A similar thing happened to me when I was in school. I didn't get along with one of my teachers, and she bad-mouthed me to other students.
I had a couple of teachers like that in high school and college.
Lucky for me, I also had teachers who liked me and were setting the record straight.
I found out when one teacher told me not to listen to anyone else, and that I really was a good kid and she could never see me hurting other people.
Needless to say, I wasn't amused and got details later on.