Japanese samurai were drawn to

Confucianism
because of its teachings emphasizing discipline and self-control.

The core values of Confucianism, such as loyalty, righteousness, and respect for authority, resonated with the samurai code of conduct known as Bushido. By following Confucian teachings, samurai sought to cultivate virtues such as wisdom, benevolence, and loyalty in order to become better warriors and serve their lords with honor and integrity. Additionally, Confucianism also emphasized the importance of human relationships, hierarchical order, and proper conduct in society, which aligned with the hierarchical structure and social norms of the samurai class in feudal Japan. Overall, the teachings of Confucianism played a significant role in shaping the ethical and moral values of the samurai class.