The fact is that even many adults tend to make bad judgment calls. The same goes for 14 year olds and they sometimes consistently make calls that seem ridiculous to older people. That it seems ridiculous to you doesn't make it ridiculous to some 14 year olds.
Your examples both fail to take into account that say 10% of youngsters may not act like you would expect them to. Many did not survive wars; many would still dive into the river in an emergency. You can repeat how stupid something is until you throat goes soar: that doesn't mean the person under discussion was capable of understanding that.
I think you should read up on your developmental psychology: the ethical calls of 8 or 14 year olds tend to be pretty different from those of adults. Especially the regular outliers are fascinating.
A kid with a knack for electrical engineering... hmmm, might he just be a little behind in his understanding of social phenomena? Of the value we adhere to other people's wellbeing?
I still have the capacity to reason about things without any concern for the people involved. People ask: how can you even consider that, given the consequences to the people involved. The seem paralized to even consider some options, as they immediately think it would be bad for humans. My answer: like any other factor, you can perfectly exclude 'people' for simplicity, to take that factor into account later. Sometimes that make the previous exercize a waste; sometimes it brings a valuable perspective, because the cost to humans turns out to be avoidable in some way. Think 'nuclear energy' in the 80's. Many people were incapable of any sound reasoning about that, because of perceived costs to human lives.
Perhaps only one person should have said to this boy "ehmm, do you realize how dangerous this is? What if your mother was in that tram? She might get hurt. You may only want to change the way a tram goes, but they can't just change the next interchange to fix that, if their system is solid enough to notice the change at all." With some people, you really need to drive a point home, before they understand.
Your observation that some adults appear to never mature is irrelevant. Society makes its rules known through common sense and law, and any 14 year old that is capable of hacking a tram is intelligent enough to have picked up on society's general distaste for human death and destruction of property. That is, it hardly matters if a specific person is capable of understanding why something is illegal, it is still illegal. What's more, if he was aware enough to study and record the tram system then he was aware of the danger. If he had taken a city bus for a drive no one would be excusing him.
The only misunderstanding of social phenomena I can imagine is difficulty interacting with people. Maybe frustration getting attention for his ability due to age. So lets not overlook him, lets not say "well you're just 14, what could we expect". The kid messed up, he should be liable. What he did was pretty cool, stupid, and since no one died, hopefully it won't mess up the rest of his life.
(Didn't it used to be part of hacker culture that people should be given credit for their actions regardless of age, sex, or race? Well, this is that, going the opposite direction.)
and any 14 year old that is capable of hacking a tram is intelligent enough to have picked up on society's general distaste
Intelligence has little to do with the ability to empathize or with social skills in general. Yes, an intelligent person with an autistic disorder may be able to mitigate the consequences of his disability by learning the required responses. However, a fourteen year old will never have mastered that technique yet and some never do. And no, I'm not claiming this boy has an autistic disorder; what I am claiming is that many such people, myself included, have traits that much resemble those of people with autistic disorders, to the point where I often feel like I'm responding from knowledge to social situations, rather then from feeling. And I remember a particularly (in hindsight) stupid thing I almost did when I was a 12 years old, because I had no regard for the people involved. Nor for the consequences for me BTW. That is one important point people are overlooking: the boy may also have failed to realize he could go to prison for this. So busy tinkering and playing that he lost sight of the outside world.
What's more, if he was aware enough to study and record the tram system then he was aware of the danger
Rationally knowing something could go wrong and linking that to actual people actually suffering is a huge step for some people. Eichmann is probably the canonical example. Yes, he was liable and he was rightfully held accountable. That doesn't necessarily mean he was guilty in a moral sense. Can you be guilty of failing to consider consequences to other humans, if failing to consider those consequences is your natural way of being? I'd rather call it a mental disability than criminal intent.
The problem is not with the boy.
What. The. Heck.
How old do you have to be to understand "If a train derails, people die. People dying is a bad thing. Trains are big and complicated and are operated by professionals or at least people trained to use them, like, you know, cars." ?!?!
For several thousand years of human history we expected 14 year olds to go off to war, die gallantly, and come back and raise children if they survived. They proved up to the challenge. Now they're infantilized to the point where they cannot be reliably expected to show empathy for people who die as a result of their actions.
What. The. Heck. Words fail me.
[Edit: Gah, the more I think about this the more livid I get. GAAAAAAAAAH. I used to be a teacher and my child developmental psychology is a little rusty, but I also used to be a Boy Scout and can remember what we were doing when we were eight. It included practicing for emergencies such as What To Do If Someone Falls In The River. Answer: don't enter the river, because they are panicking and will drown you, instead, throw them a rope or flotation device. We did not have to explain to eight year olds that people drowning in the river is a bad thing or that the predictable consequence of pushing someone off a bridge into a river is that they will die, this is a bad thing, accordingly don't push someone off a bridge into the river even if you think he will look really funny falling into it.]