The biggest goal of the samurai was to defend the master!
Explanation:
The samurai were obliged to comply with the Bushido code, but of course how many samurai actually adhered to that code varied considerably.
Bushido came under the strong influence of the philosophy of Confucianism, and promoted loyalty to his superiors, self-discipline, self-respect, and moral conduct.
Death is not the worst for a samurai. The scariest thing is to stay out of honor. And even then an honorable death should be chosen.