Very sad. The story is in the Daily Mail so the chances of us having all the facts from this are very small.
A child has been failed. Who knows how far back it goes or for how long and by whom.
On a broader point, I would have thought, however, that, legally, once in school, a child is a schol's responsibility. If a child is on school premises, the child is under school's care and they have a duty of care. Letting a child walk off under their own steam is, potentially, a failure of that duty of care. Schools who deal with children with behavioural problem have a legal responsibility to have systems in place to protect against such obviously foreseeable risks as a child leaving the premises
I am not saying that is what happened here but as a matter of law, on a general level, you can't just let kids walk off.