Factors that Influence the Creation of a Code of Conduct

What are the factors that influence one’s decisions in developing an institution’s code of conduct? How might each of them influence the decision making?