From Quartz, the answer to a question asked tens of thousands of times in California, where the tourists roam (here in Hawaii we already know why Asians wear surgical masks).
The custom of facemask-wearing began in Japan during the early years of the 20th century, when a massive pandemic of influenza killed between 20 and 40 million people around the world—more than died in World War I. There were outbreaks of the disease on every inhabited continent, including Asia (where it devastated India, leading to the deaths of a full 0.5% of the population). Covering the face with scarves, veils and masks became a prevalent (if ineffective) means of warding off the disease in many parts of the world, until the epidemic finally faded at the end of 1919.
Are the Japanese keeping germs in? Or, keeping germs out?