Atticus's chief reason for mounting a good defense of Tom Robinson rather than participating in a mockery of justice is his own integrity. He knows the system is rigged against black people, but he realizes that he doesn't have to capitulate to its ugliness. As he tells Jem,
The one place where a man ought to get a square deal is in a courtroom, be he any color of the rainbow, but people have a way of carrying their resentments right into a jury box. As you grow older, you’ll see white men cheat black men every day of your life, but let me tell you something and don’t you forget it—whenever a white man does that to a black man, no matter who he is, how rich he is, or how fine a family he comes from, that white man is trash.
In the above quote, Atticus expresses two of his personal reasons for trying his hardest to insure Robinson a fair trial, even though in the end he knows Robinson will be convicted. First, Atticus believes a court of law should be colorblind and judge people impartially, regardless of their race. Second, he thinks any white person who takes advantage of blacks people is "trash." In other words, Atticus couldn't live with himself if he didn't do his best for Robinson and treat him as he would a white client.
Atticus also wants to model integrity for his children so that they will grow up to be honorable people.