You’re claiming that a defense attorney is required to LIE and make stuff up??
You live under the illusion that the courts exist to dispense justice. They don't. They serve as venues for the administration of due process, nothing more. "Justice" becomes what the legal system determines it is once due process is executed. That's the way our system of jurisprudence works. And it's got its flaws, for sure. The only thing worse is everything else.