Well, a legal system, any legal system (indeed any system of justice) is driven by the biological drive for revenge, which itself is just a defense mechanism.
(Our laws against murder, rape, etc do not come from Judeo Christian values by the way, or they would be unique to our society. They are not.)
“Justice” is merely revenge, which again is biologically motivated, taken in appropriate measure against the appropriate people. Thats what it all boils down to.
Systems of justice, and thus legal systems, are organized constructs or methodologies we use to 1. find the appropriate persons(s) to take revenge upon and 2. gauge what level of revenge is suitable for the offense committed.
I mean, if someone breaks into your house and you call the police, its an act of revenge just as suredly as if you had called the chief/warriors of your tribe; the only real practical difference is the level of organisation.
In the situation the OP is talking about, one could argue that we allready have a set amount of revenge for the crime the person committed, and we allready have a set methodology for determining that this is the correct person to take revenge upon. So these girls were stepping out of bounds by taking their revenge in the way they did when we have an agreed upon system of revenge allready.
But it could also be argued that if people, or women to be more specific, start taking their own revenge in these situations more and more often as time goes by, then that is an indication that in this area our organised system of revenge is not meeting its #2 responsibility of making sure the level of revenge is appropriate to the offense; that the populous no longer trusts the system to inflict revenge appropriate to the crime. This, of course it goes without saying, can only be the systems fault as the system exists only for the sake of peoples confidence.
Personally, the only real problem I have with what the girls did was that they took revenge twice. Not only did they attack him, but they called the cops as well. Usually in these types of situations, and I have been in more than a few though not in this type of crime, its an either-or thing; one takes ones revenge oneself and so there is no need to involve the police, ~or~ one lets the police and justice system handle the revenge for you. Its rather bad form to do both, but theyre young and in highschool so its not as gauche as it would be if they were older.