The Knight’s Code is a code that knights are expected to live by and honor. It focuses on bravery, chivalry, courtesy, and honor. In any situation that a knight faces they are expected to follow the knight’s code and represent their King well.
If a Knight doesn’t follow the Knight’s Code he will face humiliation and be dishonored by his fellow knights. In that time period, this would have been a very big deal that could be like someone being dishonored from the military in today’s age.