Children do not have the level of comprehension or understanding as adults do. That's why there are laws that prohibit certain activiities in orderr to protect them such as drinking, smoking, gun ownership, driving, etc.
You yourself acknowledged that fact, how? Because you set that limit of prostitution and child pornography at the age of 12. You know that children before that age have a premature or an incomplete congnition. But ask them if they want to learn how to drive and they would generally say yes.
You could say that in most traditions, kids at that age are already classified as adults because they're given the rite of initiation that officiates age such as Toga parties. Furthermore, they generally begin to marry at that age, on.
However, bear this in mind: the average mortality rate before 20th century is 30 years of age. Also, the same people who determined such an age are the same who generally regard the female sex as the weaker in every catagory; not all have the same estimation but that tells you limited their knowledge us, without science. Adulthood, therefore, is dictated by circumstances and limited sight, rather than biology, psychiatry, etc. Before the age of science there is hardly any method of observation, experimentation, and testing close to the Scientific Method.
Even at the age of science, before the 1940's, intelligence is measured in brain size... rather than observable intellectual capacity. Thus they believed that the European people is more intelligent than the African. Since then, science proved otherwise. The African, and other darker-skinned people are just as intelligent as the light-skinned peoples of Europe.
And science also proved that the age of full adult maturity, in terms of fine motor ability, strength, and cognition, is far beyond the age of 12. Teenagers, in their adolesent stage of development (ages 10-19*), could not be trusted with just anything.
* https://www.healthychildren.org/English/ages-stages/teen/Pages/Stages-of-Adolescence.aspx