It could also be due to jealousy. If there was another character who seemed to be getting closer to Percy, Annabeth might lash out in a way that hurts his feelings. Like if a new demigod joined their group and Percy was being friendly, Annabeth might feel threatened and say something mean.
One possible reason could be miscommunication. Maybe Annabeth said something without realizing how it would come across to Percy. For example, if she was stressed about a quest and snapped at him when he was just trying to be helpful.
Another reason might be that Annabeth has her own insecurities. She might be afraid of losing Percy in some way, like if he was getting more powerful and she was worried he'd outgrow her. So she could push him away by hurting his feelings, not realizing it's a self - destructive behavior.