I agree with what Pan and Ed have said.
According to Paula Figoni , her book on How Baking Works explains it like this :
"How Does Sugar "Cook" Egg Yolks ?
When sugar is placed on egg yolks and not stirred in, the yolks gel and appear to cook. Sugar, being hygroscopic, pulls water from the yolks (recall that yolks are about 50 percent water) and dries them.
Without water, proteins in the yolk are closer together and quickly aggregate, as if heat was...