Everyone is entitled (in the US) to due process and a lawyer to defend them. There is nothing unethical or immoral about it. It's a fundamental right.
The standards of ethics they are checked against are not yours or mine, they are the rules they agreed to. To pretend like ethics aren't a thing for lawyers is surprisingly uninformed for HN.
I bet you change your mind about the ethics of having a lawyer represent you.
Unless you are the sort of person that claims that reality is just an opinion, too, in which case you should also study formal philosophy.