On the matter of knowledge and risk taking that has been discussed - DarloRich is spot on in saying that there's plenty of evidence that adolsecents are more motivated to take risk, and poorer at assessing risk, than adults.
This is a nice, open access summary article from 2010. A short extract is indicative, describing the 'dual systems' model of adolescent cognitive development
According to this dual systems model, adolescent risk-taking is hypothesized to be stimulated by a rapid and dramatic increase in dopaminergic activity within the socioemotional system around the time of puberty, which is presumed to lead to increases in reward-seeking. However, this increase in reward-seeking precedes the structural maturation of the cognitive control system and its connections to areas of the socioemotional system, a maturational process that is gradual, unfolds over the course of adolescence, and permits more advanced self regulation and impulse control.
The temporal gap between the arousal of the socioemotional system, which is an early adolescent development, and the full maturation of the cognitive control system, which occurs later, creates a period of heightened vulnerability to risk-taking during middle adolescence.
In other words, adolescents develop the mechanisms for reward-seeking and risky behaviour before they develop the cognitive control systems that facilitate self-regulation and control.
I should point out that this is a conceptual model, although it is supported by significant amounts of evidence (eg
see a 2016 review). The authors of both articles note too that risk-seeking behaviour and brain development are not the same in everyone. In other words, individual brain development happens at different speeds and risk-taking will depend on social effects too. But this model holds for the majority of adolescents. So the evidence is pretty strong that simply telling teenagers that a particular activity is dangerous is not as effective as it is in adults.
I don't know the extent to which this changes the legal case, but it does at least I think add some weight to the notion that the average 13 year old who sees a hole in a fence may reasonably be expected to be more likely to go through it than both younger children who have not yet developed the same reward-seeking behaviour, and people over 20 who should have developed self-control.