Legal ethics are more stringent than the law – in some areas. And they are silent in other areas. If you’re picturing legal ethics as sort of a “super morality” code, then you’re mistaken.
A lawyer can be disbarred for doing something that seems highly moral – breaking confidentiality, for example, to ensure that an innocent person isn’t sent to jail. They can be disbarred for acts that are morally neutral – co-mingling client and personal funds in a single bank account, even if scrupulously accurate records are kept as to whose funds are whose, and not a penny is paid out wrongly or lost by anyone.
Bybee offered a legal judgment on a legal issue. Congress’ decision to remove him, should they make it, is a political one. But there’s no legal ethical rule that says, “Thou shalt not opine that morally horrendous matters may be legal.”