When the Chinese first settled in San Francisco the custom continued, with cookies being made by hand until 1964 when first automated production began. The History of the Fortune Cookie. For many centuries the Chinese have marked special occasions and festivals, such as Harvest and New Year, with the giving and receiving of Moon-cake pastries filled with lotus seed or red bean paste.