Sounds like this was a case of procedural issues. The boy's mother didn't attend the meeting needed to dismiss the charges, so it was automatically referred to a judge who dismissed it as soon as he saw the boy's age. The only place where it seems like something went wrong was with the initial charges being filed.
This. I will also add that I will bet 20 to 1 the young boy charged here is African American.
More likely than not, at best (from the article linked in the tweet):
""When a cop picks up a white boy, he takes him to his parents," said Mary Stansell, juvenile chief at the Wake County Public Defender's Office. "But if he is black, he takes him to the state."
From 2015 through 2018 nearly 7,300 complaints were filed against children age 6 to 11 years old, according to numbers from the state Juvenile Justice section.
Of those complaints, 47% were against Black children, 40% were against white children and 7% against Hispanic or Latino children.
In general, 22% of the state's population is Black, 70% is white and 10% is Hispanic.""