Why does Atticus defend Tom Robinson even though he's aware of the roadblocks he will encounter?
Simply put, Atticus has values and beliefs for which he is willing to fight, no matter what the circumstances. He is the moral compass of Maycomb. When the Tom's case comes to trial, racial tensions already evident explode in the town. The judge chooses Atticus for the case, perhaps knowing that it would be the only way for Tom to even have a shot at a fair trial.
Atticus, known for his strong character and commitment to honesty and justice, takes on Tom Robinson’s case, determined to give the man a chance at a fair trial. He could have passed it to someone else, but he knows he has a duty to complete. In doing so, he brings his family under the public scrutiny, a scrutiny which directs disapproval on him and on his children. Despite this, Atticus is unwavering in his determination to stand up for his beliefs. He is able not just to oppose injustice, but to see good in the very people who despise him. When Scout asks him why he is defending Tom, Atticus replies that if he didn't, he wouldn't be able to hold his head up among people. He also reveals that he knows they will lose, but he's determined to try anyway.
Although he knows he will lose, Atticus is determined to show the town that Tom is a human being with equal rights. His message does permeate the society: at the end of the trial, everyone in the courtroom stands in respect as he passes. Miss Maudie speaks of his courage, and the fact that he does a duty that no one else in town will do. This is reinforced by the food given in appreciation of Atticus' work.
Atticus has high values and beliefs. Unlike the other white folk within the town, Atticus believes that everyone should be loved equally. He takes up Tom's case because he knows he is innocent and he does not want an innocent life to be taken up simply because of the fact that he is African. With his high morals, he instills them in his children so they understand how not to be like the cruel nature set forth by their society.
Atticus defends Tom because he can not defend himself and he knows he will not get a fair trial. His first defence case in Maycomb were the "last two to be hanged" by an unfair jury for a minor infraction dispite Atticus pleading " not quilty." For Atticus it was the "beginning of his profound distaste for the practice of crimminal law."