Stiles is only mistreated by a teacher who has yet to give a legitamite reason for loathing him, unless I missed something. I can see where the Scott hate is coming from when it comes to Derek, because he's saved Scotts ass a few times and even mentored him in a way, but his fans are forgetting that he's still an ass, and although he gets protective and brotherly with Scott, he still has no qualms with killing his friends
I think the jerk of a teacher dislikes Stiles because Stiles's father question him over the Hale fire. So I guessing he now has a grudge against the Stilinks. But he only take his resentment out on Stiles. I get that Derek has saved and helped few times, Which Scott has also did for him. But they still paint Derek guy who can still do whatever to whoever and because his has a tragic past, That gives the pass for nearly all of his action. They also at the same time condemned others for there mistakes and mishaps.

HIMYM