The purpose of a code of conduct is to explain exactly what conduct is expected of all employees and the consequences if they act unethically. This helps reduce the likelihood that they'll undertake unethical actions, which protects the company's shareholders.