Programming is arguably one of the best ways to derive pleasure and seeing meaning in the learning process. You create, you design, you implement, you learn from others and in the end - most importantly - you have something working (and to show off), together with the thrill of knowing that this existed _because_, and solely because, you made it happen.
It gives one a purpose. So in order to bring things that're only in your imagination into reality, you learn to code better, and learn about what you're trying to code (say, history, or science, or Tarot decks if you're into that).
Instilling this sense of purpose to our young is a very lofty goal. In our current context, programming seems to achieve this goal in a far more time-efficient and rewarding way.