It's a very common practice on StackOverflow to give a short answer first, then flesh out the rest with an edit later.
No, it's not chance – he asked on stack overflow because he knew the chances would be likely that someone would find the answer. Skeep is an extremely knowledgeable person and it shows in his history there, so I'm not surprised that he was able to come up with the answer.
Have a look at the comments, Skeet professed to knowing the solution beforehand. Still impressive nonetheless.