One is a judge and the other a criminal; one is Tarrou’s "Enemy Number One" and the other the man to whom he feels "intimately" connected. These characters are mirror opposites and therefore foils for one another, if only from Tarrou’s perspective. This would be all nice and neat and easy if they weren’t rendered identical by that owl-imagery business. See "Symbols, Imagery, and Allegory" for more. It’ll rock your socks off.
Both Rambert and Rieux suffer from questions of love and duty. Both are exiled from their wives. Rambert’s hesitation to stay and fight the plague highlights the immediacy of Rieux’s actions and vice versa. While each man does elect to stay and endure, the differences in their motivations force us to take a closer look at each man’s reasoning.