Atticus is standing up for Tom to prove to Maycomb and his children that just because Tom is black, it gives them white folks no reason to disrespect the black. Atticus is setting an example. Plus, he is upholding his own moral values, so at least he isn't hypocritical. But these aren't the only reasons. Atticus knew Tom was innocent as soon as he saw Tom's limp hand, remember? How could've Tom raped Mayella if he was injured??? And, how could Atticus leave Tom to the claws of the white, racist jury??? Tom was innocent; Atticus HAD to defend him. After all, wasn't it Atticus who said, "It is a sin to kill a mockingbird," and "Just because we were licked a hundred years ago, it doesn't mean we don't have to stop trying."