Normally the system is pretty amenable to girls in her situation. Before I castigate the judge, I'd need to know a lot more about her background and the murder itself. I doubt things are as cut and dry as that article makes them out to be- things in my profession rarely are.
I would also suspect that she was offered a deal and refused it, instead taking her chances at trial and got hit hard. It happens.
The fact is, pretty much every one of my clients had a horrible childhood and horrible experiences. Most of them are not horrible people at heart but they get hit hard by the system anyway. The CJ system sucks sometimes.