Eh, like it or not, a defense attorney's job is supposed to be "Prove reasonable doubt." And they have to perform this job to the best of their abilities, even when they know their client is guilty. Which is why, the more obvious the guilt, the more evil they have to be.
To be fair, prosecutors are certainly no angels themselves, and can be just as evil, if not worse, than a defense attorney, just in the opposite direction (the less obvious the guilt, the more vicious they are)
Note that there's a difference between saying they "have" to do this, and saying that it's okay to do this.
I, for one, wish our legal system didn't rely on theatrics and human manipulation, because it does. It's not about proving guilt or innocence on a factual level. It's about making the audience, the jury, believe one way or the other.
In that sense, we haven't really evolved past the ancient Greeks.