The allegiance of this highly privileged and prestigious group was ensured by cementing their ethical principles in the code of bushido,  the way of the warrior : loyalty to one's master, defense of one's status and honor, and fulfillment of all obligations.
Those who respected the code of bushido were assured a privileged position in the group.