How exactly tofu was discovered and first cultivated isn’t known, but there is one existing legend that explains how. According to the tale, tofu was accidentally invented when a cook decided to make flavored soybeans using a substance called nagari. However, the cook ended up with bean curd instead of the flavored soy beans. Back then, the Chinese named it doufu, and was already a local meal staple as early as 100 A.D.
The subsequent visit of Japanese priests during the Nara era (710-794 A.D.) to study Buddhism in China gave way to the delicacy being given its modern name. The priests brought the Chinese doufu with them back home to include it in their vegetarian diet. A Shinto priest by the name of Nakaomi was credited with the first mention of the name “tofu,” which was regularly used as an altar offering back in the day.