Why do crystals form after you heat syrup but not in unheated syrup?

When you heat sugar syrup, you increase the concentration of sugar by driving off water as steam. This makes it more likely for sugar molecules to come into contact with each other and bond together to form sugar crystals. When the syrup is unheated, there is more water, so the sugar molecules are more dispersed and less likely to bond together. Additionally, the heat helps to break down some of the larger sugar molecules into smaller ones, which are more likely to crystallize.