Whatever your position on this subject, it is a fact that in the United States, and many other parts of the world, people of differing ages have differing access to the criminal justice system.
The defense of infancy in Common Law holds that an individual under a certain age cannot be found criminally guilty due to it being presumed impossible for them to have understood that their actions caused whatever harm it was they would have been punished for had they been adults. For example, an infant, having somehow gotten its hands on a gun, and shooting its parent in the head would be subject to neither murder, nor manslaughter, nor even criminal negligence prosecution because the courts (rightly) assume that the infant had no way of knowing that in playing with the gun, the death of the parent was a risk.
In between that age, and having full access to the criminal courts, many places have a juvenile court system. The specifics of such courts vary considerably from place to place. In some ways, the courts in the US treat juveniles with more leniency (lower caps on sentences, etc.), and in some ways some of them treat juveniles more harshly (no access to juries).
A long-standing problem with this system is how one is classified as an "infant", "juvenile" or an "adult". One common choice in this is to use age lines. These lines, while simple to implement, leave much to be desired regardless of which of the underlying reasons for having such divisions one subscribes to.
If one is most concerned with the understanding of the criminal, as is the presumed case with the defense of infancy, mental competence to stand trial serves as a much more effective and accurate metric than an age line. Not that said assessment of competence need be particularly sophisticated in the case of actual infants.
Concerns about the possibility for reform, often cited as the reason behind so many of the differences in sentencing at the juvenile level seem to practically beg for a mental health treatment of the criminal behavior rather than a criminal justice treatment in the first place. As such, a mental health style evaluation regarding the likelihood of reoffense and treatment course would serve better this goal than drawing an age line and saying that people below it can be completely reformed, but people above it cannot.
Muddying the waters still further is the concept of trying juveniles in the adult court system. When the crime is severe enough, a juvenile will occasionally be tried "as an adult", losing access to whatever protections their local juvenile court laws afford. This practice puts juvenile offenders in the worst of both worlds in terms of their ability to defend themselves, when it is the prosecutor, not the defense who gets to make this determination. Either they are denied the full slate of due process protections present in the adult court system, or they are denied the sentence caps of the juvenile court system, depending on the assessment of the prosecutor of the strength of his case.