The purpose of chivalry is to uphold the principles of honor, courage, justice, and loyalty in the face of adversity. It is a code of conduct designed to protect the person and the people, and to ensure that those who commit wrongdoings are held accountable for their actions.