When sugar is added to egg yolks and not mixed, the egg yolks gel together and appear to cook. In fact it is the sugar that is pulling the moisture from the egg yolks and drying them. Always mix the egg yolks and sugar together until light in colour.