The origins of Chan's association with tea go back to the semi-mythic founder of Chan Buddhism, Bodhidharma. A Buddhist tea origin myth details the patriarch of Chan meditating in a cave for years. However, during his meditation, he fell asleep, and in a righteous fury, tore his eyelids off so he could never fall asleep while meditating again. The lids that fell to the ground sprung up into the first green tea plant. This myth is, of course, fanciful but speaks to the importance of green tea in the context of Chan Buddhism. Just as Chan adepts would drink tea to stave off sleep and fatigue during long meditation sessions or fasts, so too, according to legend, did their founder and patriarch. The association between tea, it's ritualized drinking, and Chan Buddhism all were imported to Japan in the 1100s. The Zen monk Eisai is credited with bringing powdered tea preparation in particular and green tea plants more broadly back to Japan.
In Japan, Chan became known as "Zen," and the tea rituals and ceremonies grew and developed over time. The tea tradition developed alongside Zen's development into a genuinely Japanese religious expression. But Zen and tea culture evolved into the cultural monoliths and hallmarks of Japanese culture in the 14th to 16th centuries. This is because Zen became the chosen religion of many powerful and influential samurai, daimyo, and even various shotguns. With this backing by the warrior class, which had become the de facto ruling class, Zen and tea were lifted to the upper echelons of Japanese society. Even one of Japan's unifying shoguns, Toyotomi Hideyoshi was known for being the patron of the influential tea master Sen no Rikyu. Today, green tea and matcha preparation equipment are still mainstays at many Zen temples.