You don't seem to be able to think this problem through clearly.
Here:
"Is it ethical for a lawyer to fight to free a person they know is guilty, simply because it is part of their job? Knowing that the act they're guilty of is horribly unethical?
Universalised you could therefore say "It is ethical to fight for people to not be punished for committing unethical acts"
Now consider:
In such a world where it is ethical to fight for people to not be punished for unethical crimes that people are 100% guilty of would mean there is no proper justice. The intended world we live in expects that people will be punished for their crimes, not that their crimes will go unpunished if a third actor fights to say "yes it is unethical, but this technicality though." Another example in this world says it is ethical for a confessed murderer to get off of a crime due to a technicality, and the lawyer who knows they're guilty without a doubt can't be ethical since they released a known murderer back to the streets without their punishment terms being met since not they're suddenly deemed not able to the charged This is not the type of people that's expected...
Or let's try another way.
Is it ethical for lawyers to fight for people they know are guilty and put them back on the streets simply because it is part of their job? Universlaisd, the lawyers job is for their client and to do whatever is best for their client. In this same vein it is ethical for actors within a company to do whatever they can that's in the best interest of their client/business
In such a world it would be ethical to dump chemicals in lakes near residences because it is in the best interest of the business and the greater societal harms are not the concerns of the person doing whatever is best for the business
Another way to look at it...
In such a world punishment for crimes can be argued out even when the person is 100% guilty and says they are, if it is part of one's job, not related to guilt. This creates a contradiction where society expects people to be punished for crimes, not freed because of individual relationships with clients.....
- - - Updated - - -
Like my scenario in response to him proves.
It is ethical for a business to dump chemicals in lakes if it is in the interest of the business and the agent working for the business makes that decision. There's nothing "unethical" about that action in such a world where all that matters are the clients and what the professional can do to benefit the client.
Society be damned.
People often think "but legal so what prob?" as if that's where it ends