I never understood the point of lawyers. Their job is to literally throw off the court in the process of determining the truth and choosing punishment for crime. For everyone else this would be another crime called "obstruction of justice", and yet for lawyers it's their actual job that courts allow.
Their job is to represent their clients interest and make sure they get a fair trial. There's nothing wrong with that. In fact, it is one of the most important jobs for a justice system. I for one do not want to be charged for a crime I did not commit, and a good lawyer will turn that charge to shreds.
Of course they sometimes seem like the bad guys when defending rough criminals but those have the right to a correct and fair process too.