Sometimes that wall isn't as high as it seems and as long as people know that, they can still break in.
For example, Minecraft (which is mentioned in another comment) has a pretty good ecosystem of mods and plugins that you can look at the raw code for, twiddle with, change, etc. I could easily see kids learning from that the same way I learned from screwing with ROM.
It seems like the big developers are willing to a degree (HUD coding, add-ons, interface wrappers) but not direct creation of content. Admittedly, its a lot of modularity and tools you'd need to both build into the main game, and find a way to make intuitively accessible to your players. But, that would probably drive some neat language development as well, since you'd either need to require they learn something like Lua or Python, or develop a very smooth way to write valid in-game code.
If you open up everything for players to code with, you need the devs to vet it, else you open up people creating exploits, opening up, say, tier 9 equipment for defeating a tier 1 level boss, or similar, and players may vote to allow such things even though it would lessen their enjoyment, and break the longevity of the game (thereby also reducing subscription profits).
Now, create a sandbox server, allow limited betas of content (so as to avoid everyone already being familiar with it if you adopt it), give the players a place to give feedback, but leave it to the devs to ensure it's balanced, the lore is consistent, etc, and you're onto something; that would be really cool.
I wish MUDs would have done better because interactive text games would provide much needed variety for brains that the currently graphics dominated games.
I still get goosebumps when I think about the impact that community had on my life.
MUDs tended to be free to play and were run by unix hippies. The line between playing and coders was thin and easily crossed; playing the game led almost inevitably to understanding the mechanics and becoming a coder. I feel sorry for today's generation of gamers, since there is a much larger wall between playing and creating these days. CodeCombat and others are trying to bring that link between gaming and programming back - good for them.