The difference between ethical and legal is
the difference between what’s "right" and what’s legal.
Which amounts to the difference between what’s right
and "whatever you can get away with 'legally'".
"As long as it's legal" is a self-evidently inadequate standard of conduct for public service.
In particular it is, when "legal" means all the cost is no object litigation and legal weaselry taxpayers can afford. Trust and treasure squandered in the interests of politicians and public servants who would rather "admit no guilt"; even when they are guilty beyond reasonable doubt. They spend without limit in meetings in secret and without real oversight.
Take for example; the three-quarters of a million operational dollars that have been squandered on a non-viable "legal" defense of former APS school board member Marty Esquivel's ego.