The myth is the white base color of the candy cane symbolizes Jesus’ purity; the red stripes symbolize Jesus’ blood when he died on the cross; and the J shape was chosen to represent the J in Jesus. These and all other religious connotations have been debunked or not able to be proven as fact.
The facts - Candy canes started as white sugar sticks with no hook
as early as the 1600s. There is no reference to calling them candy
"canes" until the mid to late 1600s. No fact as to why the sticks
were changed into canes, although many believe it was so the candy
could be hung on a Christmas tree.
The red stripe was not added until the early 1900s. No one knows who
invented the stripes, but Christmas cards prior to the year 1900
showed only all-white candy canes. Christmas cards after 1900 showed
illustrations of striped candy canes.
The bottom line is that we do not know who started making them,
why, or who added the hook, but most people love candy canes and
that is a fact.