We study "ethics" because society cannot function without a series of commonly-accepted moral codes that define boundaries of acceptable behavior. We also study ethics because there is not always a consensus on what types of behavior are acceptable.
The essence of civilization can be said to center on the emergence of a broad consensus regarding acceptable types of behavior. Accepting constraints on our freedoms for the benefit of the greater society is an essential condition of a functioning society. Often, types of conduct or actions that are perceived as threatening to the well-being of society are proscribed by law. There may be, therefore, a considerable overlap between the law and codes of ethics. Certain types of professions, however, adopt codes of ethics precisely for the purpose of clarifying and educating, for the benefit of practitioners and customers alike, the boundaries outside of which certain activities are considered immoral and damaging to the integrity of the profession and to the well-being of the customer. Physicians and nurses, for example, adhere to the Code of Medical Ethics of the American Medical Association, a non-governmental professional association that establishes ethical standards guiding the medical practice. Similarly, members of the legal profession adhere to a set of standards outlined by the American Bar Association, a non-governmental organization that established a code of ethics guiding the professional conduct of lawyers. These codes of ethics proscribe activities that undermine the integrity of the profession and harm the interests of clients.
The study of ethics is essential to the stable functioning of civilization. Moral quandaries are inevitable in certain professions. Studying the origins of moral standards and the role they play in society helps to understand the lines separating acceptable from unacceptable types of behavior.