while others believe the white colour stands for purity and the red stripes represent the stripes on Christ's back when he was beaten before the crucifixion. Some say their hardness represents the church's strong foundation, or that the peppermint flavor harkens back to hyssop, a sacred Old Testament herb.
While any of these meanings can easily be applied to make candy canes more meaningful, the truth is actually much simpler:
Beginning in about the 17th Century, when sugar became more widespread, European confectioners started producing hard candy sticks. At that time, anything made with sugar was still considered a treat, and mostly reserved for special occasions such as Christmas. Eventually parishes began giving the
hard candy sticks to keep children quiet during service. These versions were bent at one end to resemble a shepherd's crook, and by extension, a bishop's crosier.
These first versions of candy canes were not flavored, but were made from plain sugar. Over time, in countries where Christmas trees were popular, people found that, with the candy canes' crook at the top holding them in place on the tree's limbs, they made the perfect edible tree decoration.
--Canadian Farmer's Almanac 2015