A lie is the simplest way to protect a secret, though some have worked out subtle forms of evasion in answering unauthorized questions regarding a professional secret, such as "I know nothing about it" (with the mental reservation "to communicate to others"). The line between appropriate and inappropriate requests for information may shift from one society to another and be revised over time; but wherever the line is drawn, those charged with secrets have to decide how best to protect them. The same loyalty also shields colleagues. Politicians, for example, or professionals may be reluctant to divulge the incompetence or dishonesty of their fellows. The problem arises when loyalty or professional ethics in the interests of peers and clients overrides law and morality itself.
A doctor may fail to disclose a pilot's unstable heart condition that may lose him his job.
To keep silent regarding a patient's confidences is to honour one of the oldest obligations in medicine. Lawyers do the same for their clients as do priests in hearing confessions.
The relationship between a lawyer and his client is one of the intimate relation. You would lie for your wife. You would lie for your child. There are others with whom you are intimate enough, close enough, to lie for them when you would not lie for yourself. At what point do you stop lying for them?