I ran away from school a whole lot when I was small. Nearly always over an issue of injustice. I was going to say "I think the girl needs someone to listen to her complaint and to have her feelings validated then needs support in finding a way to make peace with the fact the world is not always fair".
but then I read that that girl was you!
So I will say it straight to you: I totally sympathise with you running away and it's not fair that you had to apologize. I hope you have come to terms with the world and its failings when it comes to justice! I still battle with that one.
I have come to the point of understanding that the world doesn't actually function on principles, it functions on pragmatics. Now as well as thinking of what an action means I try to also think of what effect it will have in the world, and make sure that the effect is not harmful to me or my causes. Maybe your little girl self would have benefitted from a philosophical discussion on that, e.g. "You're quite right that that was not fair. I can see that you wanted to get away from that place. Can you see what happened because you ran away? It didn't help you did it? how about next time you feel that way, remember what happened and you can tell me all about it later. Then you can stay at school and you don't have to get in trouble".