They don't understand the consequences as well as fully grown adults, but they do know the difference between right and wrong.
As you can see, right/wrong is not my argument here.
Young children in America are imperiled by abuse, neglect, domestic and community violence, and poverty. All of which can have effects on the minds of children. Not to mention, the offender here was not just one child, but two. Two children with a stupid idea can go a long way, even one child with a stupid idea can influence their friends to commit crimes as well. Peer pressure, it's a thing among children. There are a lot of factors involved here other than "this child is a sociopath and will never change", because as we all know and have experienced: children change considerably over time.
Thousands of children are housed in adult jails and prisons on any given day in America. Children are x5 more likely to be sexually assaulted in adult prisons than in juvenile facilities and face increased risk of suicide. Confinement of children with adults in jails and prisons is cruel and unusual, and it should be banned. Not to mention the fact that it's unconstitutional. Children are protected on some degree by the law and every time we throw a child in prison with adults violates their rights.
From wikipedia:"Children's rights are the human rights of children with particular attention to the rights of special protection and care afforded to minors,[1] including their right to association with both parents, human identity as well as the basic needs for food, universal state-paid education,
health care and criminal laws appropriate for the age and development of the child, equal protection of the child's civil rights, and freedom from discrimination on the basis of the child's race, gender, sexual orientation, gender identity, national origin, religion, disability, color, ethnicity, or other characteristics. Interpretations of children's rights range from allowing children the capacity for autonomous action to the enforcement of children being physically, mentally and emotionally free from abuse, though what constitutes "abuse" is a matter of debate. Other definitions include the rights to care and nurturing"