But a Taoist priest accidentally dropped the brine into the soybean milk. Unexpectedly, the soybean milk solidified. This Taoist thought that "soybean milk was corrupt", but other Taoists tasted it and there was no adverse reaction afterwards. So it was later named tofu.
Extended data
Tofu has a long history. According to legend, it was invented by Liu An, the grandson of China's great-grandfather Liu Bang, in BC 164. When Liu An was burning medicine and alchemy on Bagong Mountain at the junction of Shouxian County and Huainan, Anhui Province, he accidentally ordered bean juice with gypsum, thus inventing tofu.
Yuan Hanqing believed that tofu only existed in the Five Dynasties. According to Qing Louis written by Gu Tao in the Five Dynasties, Japanese scholar Shinoda believes that tofu originated in the late Tang Dynasty.
Tofu didn't become an important food until the Song Dynasty. Lu You, a poet in the Southern Song Dynasty, recorded that Su Dongpo liked to eat candied tofu tendons. Wu's Dream records that restaurants in Lin 'an, the capital, sell tofu and fried tofu.