You need to remember that in this chilling short story the narrative mode used is first person point of view, therefore we see everything and everyone, including Captain Torres, through the eyes of the narrator - the barber, who is anxiously deciding what he should do as he begins to shave the enemy of the rebels. I find your question interesting, because you appear to be making an assumption that Captain Torres is "crazy". Certainly it is never made explicit in the text. The story makes evident his role in quashing the rebel forces and his inventive methods of dealing with captured rebels. Consider how he is introduced:
At that moment he took off the bullet-studded belt that his gun holster dangled from. He hung it up on a wall hook and placed his military cap over it.
This description of him hanging up his military equipment confirms him as a man who is an experienced soldier and used to violence. We later find out that he has just returned from an expedition capturing some of the rebels. His conversation with the barber makes it clear that he is a man who feels no compunction about violently and horrendously suppressing the rebels, calling their slaughter "a fine show" and saying "The town must have learned a lesson from what we did." The barber also recognises that he is a creative man:
A man of imagination, because who else would have thought of hanging the naked rebels and then holding target practice on their bodies?
As the conversation continues, it is clear that he takes great delight in planning the torture and death of rebels, talking about planning something "a little slower" than a firing squad to dispense with the latest prisoners.
However, what is interesting is that the barber describes him also in a way that is not violent. He says that a beard would suit Captain Torres, making him look like a poet or priest. The barber also comments on how his work transforms Captain Torres:
The beard was now almost completely gone. He seemed younger, less burdened by years than when he had arrived. I suppose this always happens with men who visit barber shops. Under the stroke of my razor Torres was being rejuvenated - rejuvenated because I am a good barber, the best in the town, if I may say so.
This is a highly interesting quote because it shows the pride the barber takes in the work he is doing and also a kind of pleasure in the transformation he is able to achieve in his customer. It appears although he is on the "other side" from Torres, he also wants to do a good job as a conscientious barber.
However, it is the final paragraph that really establishes Captain Torres as a fascinating character who is definitely not just a crazy, blood-driven military Captain:
In the doorway he paused for a moment and said, "They told me that you'd kill me. I came to find out. But killing isn't easy. You can take my word for it." And he turned and walked away.
This is not an action we would expect from such a violent man - he knowingly goes into the barbershop and runs the risk of having his throat cut, and then leaves without killing or capturing the barber. His character is clearly deeper than we have been lead to believe, and we leave the story with a renewed sense of respect for Captain Torres. So therefore, not "crazy" at all.