Despite what the typical modern image may lead you to believe, there was nothing loyal, chivalrous, or noble about these men.
The samurai originated during the Heian period (794-1185 A.D.) in Japan (‘samurai’ is derived from ‘saburafu’, which means “to serve”). They were local strongmen employed by military nobles who brought them along as servants on trips to the capital.
If anything, they were ambitious warriors who sought to enrich themselves above all else. They were not loyal to their masters by decree of some unwritten honour code (read: bushido or “the way of the warrior” didn’t exist at this point), nor were they inherently good by any stretch of the imagination. They were loyal only because they were rewarded for their services, and their allegiances could shift at any time.
All you know is only popular culture taken from some children tales..