In the Golden Gate Fortune Cookie Factory, two employees busily place messages inside warm cookies, then deftly fold them. This windowless room, cluttered with machinery and hundreds of Chinese figurines, churns out 20,000 fortune cookies a day.

The factory, opened by a Chinese family on August 5, 1962, is tucked away in one of San Francisco’s tiny alleys. Today it’s one of the few remaining places in the U.S. that make fortune cookies by hand.

Standing by the doorway, the manager rummages for fresh cookies to offer visitors. Everyone’s attracted by a free taste, but most of all by discovering their fortune.

Some have been very… fortunate. On March 30, 2005, 110 people throughout the country won close to $19 million at the Powerball lottery after playing lucky numbers they found in their fortune cookies.

And that’s why I’m here. For the past few years I have been working on a photography project that revolves around the idea of luck, investigating how it’s powerful and magical perception influences our behavior. Lucky charms, amulets, and talismans are found in all civilizations throughout history.

The story of how fortune cookies came to be is unclear and contentious. Various immigrant groups claim to have popularized them in California in the early 20th century prior to World War I, but it’s impossible to authoritatively state precisely where, when, or by whom the fortune cookie was invented.

Records nevertheless indicate that it’s likely the first person to have served the modern version of the cookie in the U.S. is a Japanese man named Makoto Hagiwara, who ran the Golden Gate Park Japanese Tea Garden in the early 20th century. Yet despite several legal battles, courts have found it impossible to determine the first inventor.

The newsletter you need Get more Bourdain in your inbox. This week: Bay Area.