system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How does attorney-client privilege work? And how is it not perjury to defend the innocence of someone who admitted their guilt to you?
gpt
First, the attorney themselves is not testifying, so they aren’t committing perjury.  There’s another offense though, suborning perjury.  A defense lawyer actually has to be careful there.

If his client insists on taking the stand, the lawyer cannot knowingly elicit false statements.  There are various ways that lawyers handle that, but mostly they pray their client isn’t that much of an idiot.

Outside of that, a legal defense is not actually an assertion of innocence.  There are various actual defenses (like a claim of self defense) but a basic not guilty plea and defense presentation is an assertion that the State cannot prove beyond a reasonable doubt and within the law, that the offense was committed.

IOW, the defense doesn’t have to assert innocence, it’s presumed, so there is no actual false assertion necessary in defending a client.