Annie John is a bildungsroman, a coming of age story. The narrator, Annie, is an adult who is explaining how she established her own identity. As all children do, the child Annie hit a point when she was testing the control she had over other people. Her desire to make Sonia suffer is a desire to test her own abilities to control the emotions of others. Annie doesn't do because she wants Sonia to hurt; she does it because she is trying to understand her own place in the world.
maybe because that is how you show your love to someone if you don't know what love is yet.