how candy canes are made

Do you know why they have the curved end ? I found the explanation below:

candy-cane_small.jpg