When the teenagers and boys suspected of setting fire to the Darul Quran Ittifaqiyah tahfiz (religious school) were arrested last month, people were incredulous as well as angry.

“The group of youths is described as loud, crude and rude,” reported The Star when interviewing neighbours living in the area. A picture has been painted of seven youths aged between 11 and 18 – some of whom had been expelled from school – spending their free time loitering outdoors late at night, chatting, laughing, and smoking. Some of them tested positive for marijuana. (See report at tinyurl.com/Star2-youths.)

These boys reportedly got into an argument with students from the tahfiz during the day. That evening, they supposedly sat in a coffee shop and planned their revenge. According to reports, they then blocked the dormitory door with two gas tanks, doused the area with petrol, and set it on fire.

And so 23 lives were lost.

Two of the teenagers will now be charged with murder, and although many have pointed out that they may perhaps escape the death penalty because of their age, there is very little sympathy for them.

But the fact is, teenagers are always getting into trouble all over the world, albeit for less serious crimes. According to the FBI, most crimes in the United States are committed by adolescents. Arrests increase until the age of eighteen, and then decline after that.

Statistics in Malaysia are harder to find. However, in 2015, there were 102 arrests of teenagers under 18 years old for murder, while under-18s also made up roughly one-third of all arrests relating to rape. (See report at tinyurl.com/Star2-teens.)

There is good reason behind this: teenagers can be very bad at making decisions. Across the board, you see teenagers indulging in risky behaviour that peak in these troublesome years, and drop off when they enter their 20s.

For example, in the United States, car accidents are the leading cause of death among those aged 16 to 24. This is related to the fact that adolescents are more likely to drive after drinking than any other group, and on top of that, drive more dangerously.

All this can partly be explained by biology (although, certainly not excused by it). I am simplifying greatly, but around adolescence, two parts of the brain undergo change: the limbic system (which affects emotions and memories), and the prefrontal cortex (which is responsible for decision-making, including assessing risks). The interesting thing is that it looks like the limbic system develops first, and the prefrontal cortex lags behind. Emotions become heightened, but the control isn’t there yet.

The result is that you will find that most children who hit puberty start becoming more emotional. The stereotype of the moody, argumentative teenager is the result. They have higher highs and lower lows. They also seek more exciting experiences and take more risks to get them.

Unfortunately, this phase can last for years because the prefrontal cortex only begins developing during the mid-teen years, between 14 and 17. And even when it does catch up, it’s not the end of the story. Everybody knows of a teenager who is “normally so reliable” suddenly doing something stupid. This is because from their mid-teens to their early 20s, the circuitry is being reinforced, and is less susceptible to fatigue or stress.

So this is the biological rationale for why teenagers behave like teenagers. But it is important to note that how the various parts of the brain develops is strongly defined by the experiences an individual has, which goes some way to explaining why some people “grow up” better than others.

For example, experiences like drug-taking or trauma have deeper, longer lasting effects – it is no coincidence that most mental illnesses make their first appearance during these formative years.

Another factor that comes into play is that teenagers take even more risks when their friends are around.

An experiment was conducted in which students were observed using a driving simulator. When they drove alone, they drove much like adults would. But when other teenagers were observing them drive, the subjects would run more yellow lights and get into more accidents. The mere presence of peers was enough to make teenagers take greater risks.

All of this taken together points to circumstances where a group of teenagers made unsound judgements. This is something that happens everywhere around the world. But it rarely ends in murder.

Did these boys know how dangerous their actions that night were? A study about risk assessment by teenagers shows that they do understand the seriousness of things like drug use, drink driving, and unprotected sex. But that knowledge is not used when deciding how to react in novel and stressful situations.

And why did some of those boys return to the scene of the crime later that day? I don’t know the reason – but it is interesting to note that one type of criminal who experts say frequently returns to the scene of his or her crime is the arsonist.

Laurence Steinberg, one of the researchers involved in the traffic simulation study quoted above, believes that a good way to curb risky teenage behaviour is not to leave teens alone at this crucial stage of development, not even in that period after school but before dinner time – he would likely be aghast to find out that these boys had been expelled and were out on their own.

In the meantime, teenagers should learn how to exercise self-control. For example, he recommends that parents practise something called “authoritative parenting”, which is shown to be the style most likely to lead to children growing up to become mentally healthy adults.

There are three aspects to authoritative parenting. Parents are told to be warm, be firm and be supportive. Children who feel warmth in their relationships are more emotionally secure to make decisions on their own. Meanwhile, clear expectations for behaviour (say what you mean, and mean what you say) help children learn how to act appropriately on their own. Finally, encouraging children to make their own decisions gives them practice in taking responsibility.

On the one hand, these children should be tried in a court of law and, if found guilty, they should be punished. But on the other hand, I think the opportunity to rehabilitate and get them on the right track should not be ignored.

For the lesson that we take from this shouldn’t be how abhorrent their behaviour is in our society, but of how much more society can and must do to make sure teenagers grow up in the best environment possible.

Logic is the antithesis of emotion but mathematician-turned-scriptwriter Dzof Azmi’s theory is that people need both to make sense of life’s vagaries and contradictions. Write to him at star2@thestar.com.my.