A CA knows that his client have two wives and he is cheating with both. Should that CA hide this? answer would be "No". Will that CA hide this? answer is "Yes".
A Lawyer knows the fact that his client is involved in illegal activity. Should the lawyer defend him? the answer is "No". Will the lawyer defend him? answer is "Yes".
A Doctor knows that his patient is criminal or country's enemy. Should the doctor operate him? answer is "No". Will the doctor operate him? Answer is "Yes".
They should not but they will. Why? have you ever tried to find out the reason? Yaa...In movies, you might have heard of doctor that they are given an oath that they will not see the background of the patient. Right, that's the reason. Morally, CA should not hide but that's their professional ethics which binds him to do so. Morally Lawyer should not defend criminal but that's their professional ethics which binds him to do so. Morally, Doctor should not operate but that's their professional ethics which binds him to do so.
The above cases are just a small example of profession as well as incidents. There are lot of profession which are governed by some statutory body and they have issued some code of ethics which binds the persons of that profession to do an act not to do an act. If a person doesn't follow that code or rules, they may even be barred from the profession. I, sometimes, see this like a caste system where you have to follow the rules of caste. If you go beyond that rules, you may be barred from the caste even if your act may be in public interest.
Suppose your client is involved in terror activity, you should inform the cops in public interest but the professional ethics which give emphasis on "confidentiality" let you keep your mouth shut. At most, what you can do is to break the relationship with client but still you are required to maintain confidentiality.
One another example which I can't resist to let you know is Journalism. If someone is being killed, they can take their life at chance to record the incidents but can't risk their life to save one's life.
when you think something is in public interest is morality/ethics but when you deny the public interest and able to justify yourself that's professional ethics. This definition may be controversial but that's the truth. A lot of time, Ethics which govern our personal behavior and professional ethics which govern our professional behavior are of conflict. And, obviously, we prefer to choose professional ethics.
Can't these ethics and professional ethics be homogeneous? Can't those be used complementary instead of substitutes?