For Whom the Bell Tolls
Anselmo's a good guy, a really good guy – he's basically the moral conscience of the book. Formerly a devout Catholic, he's abandoned his religion because of the Church's alliance with the fascists. He's also ceased praying to God, because he doesn't understand how God could let the war happen, and doesn't think it would be right to pray for the destruction of his enemies. You might say Anselmo's ethical sense is actually why he abandons his religion, even if his religion is what first gave it to him. Robert Jordan thinks Anselmo is a "genuine Christian" on account of his principles, which in the world of this book makes him quite a rarity in Catholic Spain. He's certainly the only religious character we meet who isn't a fascist.
The thing about Anselmo is that he hates killing, and isn't afraid to say so. He believes it's always wrong, and that it stands in need of being forgiven. (By whom, if not God? He doesn't quite know. "The people?"). Though he's definitely anti-fascist, in his ideal world, the fascists would be dealt with by being forced to work, so they could identify with the common people.
We should mention he's also kind of a communist, little "c": at heart, he believes in the brotherhood of all men. But Anselmo also recognizes that it's not an ideal world and that the war is his reality for now. He has no home or wife to go back to (we know his wife is dead). So he resigns himself to winning the war for the good side, even if that means killing. Though he usually cries when he does it.
As such, Anselmo is quite a contrast to the many other characters who feel bloodlust; the only thing he would ever want to kill is an animal, being an avid hunter (and seeing a big difference between killing animals and people). Other than Fernando, he's also the only member of Pablo's band with a respect for duty somewhat comparable to Robert Jordan's. Talk about staying the course – he almost lets himself get frozen to death in a snowstorm because he was ordered not to move until he was relieved.
That aspect of Anselmo may be one reason why he and Robert Jordan bond so quickly. He's basically Robert Jordan's best friend in the band, and they're close enough that on the first night Anselmo offers to blow up the bridge with Robert Jordan alone, if no one else helps. Perhaps because he's a bit more of an outsider to the band, he acts a bit like an intermediary for Robert Jordan early on, informing him about some of the others (e.g., "Pablo is probably not trustworthy").
Unlike Robert Jordan, however, Anselmo uses orders, and the sheer force of his will-power, as a way to overcome the strong anxieties he has about war. He's plenty afraid of death in battle situations, and finds that having orders to cling to make it easier for him to be brave. They also make it easier for him to kill. Additionally, he's a character who's explicit about the loneliness he feels, and how it drives him to participate in the war effort:
I am lonely in the day when I am not working but when the dark comes it is a time of great loneliness. But one thing I have that no man nor any God can take from me and that is that I have worked well for the Republic. I have worked hard for the good that we will all share later. (15.53)
Aww, Anselmo! How couldn't you want to be his friend? He's just a really good guy.