Rick runs an illegal gambling den in a Nazi-occupied territory. He is in the business of forgery, aiding and abetting and is forgiven for all the bad that he does because of the good things that he does. Since this is Rick's story, the viewer is shown that this is a flawed, lovelorn individual, but that he has something of a heart. That's Rick's character development: he moves from being this selfish, moody cynic and becomes less selfish and more hopeful as the film goes on.
Since this isn't Louis' story, the viewer must assume a number of things about him while watching the film. In fact, the climax of the film rests on the drama of Louis' allegiance. Will he give Rick away? The audience is almost assured that he is. But he doesn't. Why? Because Louis is a good man, despite his flaws. He is also a patriot. With this knowledge, a viewer can watch the film again and make a number of observations about Louis' actions: he prolongs the investigation of Rick's place, he prolongs the arrest of the revolutionist, he doesn't arrest Rick despite having cause, he forces Rick to detest him simply to get a good, moralistic reaction from him (he tells the couple to see Rick because Rick can help them; once Rick helps one couple, Louis informs him that tomorrow, he has a beautiful blond lined up-- this warning isn't actually meant to be a warning, but it's used to incite Rick into doing precisely what he wants him to do).