i shouldn't be surprised that twilight is mean to spike because he's literally the little brother / son she never wanted. like imagine being told you have to take care of a baby dragon for the rest of your life that a magic school forced you to hatch with magic at like 8 years old for an assignment and now he's your problem. still, she could tone down the mean older sister / mother energy a little
but he is literally Twilight's best friend who was always with her EVEN when other friends abandoned her, he is even more faithful than Twilight's own brother (they are both good)