Not true. In middle school, my daughter was in such favor with the teacher that she considered herself a teacher's pet.
In fact, she was such a pet that she had her own pets: kids that knew she was in good with the teacher, they wanted to be near her for lucky fallout, as it were.
On the other hand, most kids do resent teacher's pets because of jealousy, frustration or spite.
They wish they knew what to do to get on the teacher's good side.
They think that their treatment is unfair because the pet gets special consideration.
They are too lazy to do their work, so of course the teacher disses them, at least in their opinion, since they are getting criticized while the pet receives praise.
There's sort of a culture of "class envy" as it were. where it's thought that to succeed in school makes you some kind of a sellout to The Man.
Some kids want to be the center of attention, and if the pet gets it, they feel they're being somehow slighted.
Not all of these reasons are valid, but the bad feelings engendered are still real where they occur.
As for me, I was neither a pet nor a troublemaker (ahem - usually), but just did my assignments, hung out with my friends, and left the rest of it alone.
Good answer. Thorough.