The law exists so that all individuals can observe their rights without trampling over the rights of others. However, a utopia wherein everybody abides by the rules has yet to exist, and crime remains a facet of life. Laws are implemented to enforce peace and stability in society, while rooting out behavior which could violate the order.
Many would see the law as harsh and draconian, but it doesn't play favorites when it comes to delivering the verdict. All are equal in the eyes of the law, and it's only until a suspect is found guilty that he is truly classified as a criminal. Thus, the law also respects the innocence of suspects unjustly accused.
You could be suspected of a crime for any reason, even if you haven't committed a single offense all your life. This doesn't mean the law will immediately find you guilty and wrongly incarcerate (or execute) you, for you are entitled by the law itself to call upon a public defendant or criminal lawyer to your defense. A defense attorney will investigate the circumstances of the crime and tell the court your side of the story in the hopes that the jury finds you innocent. At the very least, defense attorneys can negotiate for lesser charges. Most importantly, they can refute the prosecution's claims with their immortal line: “Objection!”