-numeracy: how much is 1 million/1 billion/1 trillion, etc.
-common cognitive biases.
-logical fallacies.
-basic science.
-basic coding.
-De Bono's 6 thinking hats.
-how the brain works.
-meditation (ie not thinking).
-how to learn stuff faster and better.
-how to remember stuff: memory palace and the like.
-etc
I could think up a HUGE list of stuff in this genre that would be very helpful.
The 12 or so hours I spent in those lectures were among the most valuable hours I invested in anything, ever.
There is still, to this day, a large number of people who think education needs to be repetitive rote drill in order to be... real, or legitimate, or even 'useful' by some warped definition of that concept.
It's tied into the notion of hazing, or "If I had to waste my years in school tied to a desk memorizing stuff I don't use, so should you! Builds character!"
And, finally, the idea that if the next generation does it, too, maybe your time doing it wasn't simply wasted.
That way they get a good notion of what programming actually is.
I'm only now getting into functional programming. I would not have grokked it very well when I was like 12 years old.
I think the problem is that people are /used/ to imperative programs, and aren't given real practice in functional programming.
There are also FP zealots, some of whom maintain that learning IP first causes damage. I think this attitude is toxic and doesn't actually help their "cause" (as if good tools needed a "cause" -- good tools should just be good tools).
Real-world computer programs exist in a large set of arbitrary, often unintuitive rules that are both absolute and malleable, and change between languages and platforms. They have complicated requirements that seek to solve real-world problems that are often ill-defined. They have to cope with unexpected input, hostile input. They are large, comprising hundreds, thousands, even millions of lines of code. They have a multitude of paths that a given piece of input might take, they display emergence.
Coding is not just a simple math problem. It requires clear, detailed reasoning about complex systems operating within arbitrary sets of rules and an unpredictable world.
Related questions might be "Why do people have trouble doing their taxes by hand?" and "Why do people have such a poor understanding of the legal system?". Also, chess.
And, indeed, that's part of the problem. You really can't claim to be teaching anything of value if all you teach is programming-language syntax. One has to teach people to write some kind of actual program. And that's like teaching prose writing, except that schools and teachers have spent literally thousands of years learning to teach prose writing whereas programming was invented in living memory.
Sure, there are some hard concepts in coding, but for loops and conditional statements are hardly more difficult to understand than a lot of the math which gets taught in junior high.
Speaking of that, why is it essential for young people to learn algebra but not to learn for and if?