There are countless ways to ethically represent some one who is guilty. The prosecution has the burden of proving the defendant guilty beyond a reasonable doubt, and there are many ethical ways to persuade a jury to have a reasonable doubt, from moving to suppress illegally-seized evidence, to cross-examining the eyewitness to ask if they were wearing their glasses at the time of the incident.
Moral relativism here means the end of a society. Don’t ever think otherwise.