Hey, usually by this point in the thread some DF uber-guru has jumped in and explained what's what. But since it's the blind leading the blind...
I think I might be able to explain what's going on here. Here's why it's not really a bug:
As mentioned above, children do indeed "do as they please," but they still have skills just like any adult dwarf. You just aren't able to assign/restrict their duties until they mature.
Assume that, instead of having no jobs turned on, children have *all* jobs turned on. And, all things being equal, dwarves tend to work on the tasks that they have the highest skill in. Children start off without rank in ANY skill, so at first they can only perform tasks that have no prerequisites-- social skills, road building, building deconstruction, harvesting plants, maybe some hauling. They're seldom useful, often trapped in a spiral of social skill leveling, but a couple of these tasks can actually improve more meaningful skills. Harvesting = grower. (De)construction = masonry. They move on up to "dabbler".
And then- BAM - they'll often really work the hell out of whatever they're improving in. I usually have several professional-grade farmers that happen to be of primary school age. Real tough little bastards, too. I never forced 'em to do anything and they're not exactly prodigies, just regular dwarves except that we're unable to direct their efforts.
In the OPs particular case, I'd bet that the kid attained his "dabbler" rank in masonry from performing a generic, unrestricted task (removing a wall) which was all he needed to catch a strange mood. He assembled the items he wanted, completed the artifact, and got a whole crapload of experience in masonry, just like any adult dwarf. Ouila, instant professional stonemason. (what's that kid's skill level in masonry, anyway? Legendary?) Since he's now following the task queue for the mason's workshop, this is one rare runt that you can actually sort-of-kind-of order around.
Sorry to explain that to death, but it's an interesting question. Double sorry if someone who actually knows what they're talking about posts below and explains why I got it all wrong.