Children below age 7 (or age 10) aren't granted immunity; they were not tried often because they are arrested in a rare case (less than 2% in all juvenilen offenders) (refering to Juvenile Crime, Juvenile Justice, National Academies Press)
Note that people aged 16 or 17 (or even 15) is already triable for criminal charges (see R v Balham Youth Court).
Back to your question, why do juvenile offenders are sometimes not being charged in juvenile courts? There are mainly two reasons:
- They have less experience than adults. Although adults and juvenile can take a similar approach in making decisions, juvenile lacks experience to make themselves vulnerable to misperceptions. Which could somehow be said that they lost the intention to commit crime (mens rea)
- Juvenile lacks understanding to legal process. For children under 15, they are not familiar with the rights they have, like the right to have a lawyer, or the right to remain silence. This could make it unjust to order them appear before a judge (or magistrate) to be tried. Therefore, juvenile offenders are sometimes absolved from litigation.
Need to note that, in some jurisdiction, juvenile offenders (under 15) can also be charged in juvenile courts summarily and be sent to rehabilitation center, or even be sentenced.