The samurai were powerful warriors in Japanese society from the 12th to 19th centuries who adhered to a code of honor. They practiced traditions like shudo, where older samurai would take on young male apprentices and engage in homosexual relationships as a way to teach virtues and strengthen bonds. Though controversial to modern Western perspectives, shudo was a culturally accepted practice for samurai at the time and thought to benefit both parties. As Japan modernized with Western influence, traditions like shudo declined but homosexuality remains more tolerated than in some Western cultures.