Combats in the game don't have to go on until everyone on one side is dead... or even defeated.
Don't forget that one side or the other (including the PCs' side) can surrender, or retreat, or even convince the other side to stop fighting and do some talking or negotiating.
When every fight must end in one side achieving total, bloody victory, the game rapidly grows boring. When there's opportunity for a greater number of resolutions, there's more uncertainty to combat, and to the campaign's storyline.
If you have characters who won't stop fighting when it should be done, you have problems. Here are some things to do about them.
When Characters Don't Accept Surrender[]
When your characters won't ever accept an enemy's surrender, you have a serious problem, because it also means that those characters won't ever surrender themselves (because they know it always means certain death), and that you can never have two characters (PC and NPC) fight and later end up as allies (unless they're both chaotic evil, for instance). You can enforce the right of your NPCs to surrender (and expect to live through it) through a couple of means.
First, a surrendering character who is about to be butchered could "turn out" to have some information critical to the characters, and say something like "Kill me and you'll never learn about (fill in the blank)." This stubborn NPC won't reveal the information, even on pain of death, unless the PCs promise to accept his surrender (and those of his friends) and keep the NPCs alive afterwards. (If the PCs promise, and later renege, you can always visit other revenge upon them.)
Second, a local deity, spirit or monster could see the PCs hacking on surrendering NPCs and grow offended. Much tougher than the PCs will ever be, this being snatches up the most offensive of the PCs, tells him what he's doing and why, and then curses or kills the PC as a lesson to the others.
This is a brute-force technique, but such players have already shown that they understand little but brute force anyway.
When Characters Always Chase Escapees[]
Some characters chase after every group of enemies who run away from combat, with the avowed intention of running them down and killing them.
The best way to counter this attitude, and persuade the PCs to let the occasional band of inconsequential NPCs and monsters escape, is to have such enemies set up traps along their escape route. If the PCs pursue, they get caught in the traps and suffer damage and embarrassment. That will teach them to be more cautious in future events.
Once the characters see enemies getting away, they may come to the realization that they may themselves occasionally flee and get away.
When Characters Never Negotiate[]
Sometimes, when PCs and NPCs are thick in combat, an NPC may try to calm things down, call for the two sides to part and cease fighting—at least for a while. It may be that the NPC has figured out that the two parties should be allied, or that he wants to bribe the PCs, or even conduct surrender negotiations... from a position of strength.
If your characters never negotiate, once again your campaign options are limited. You have to brute-force some sense into them. A good way to do this is to have the PCs fight an NPC group who have a hostage or artifact crucial to the PCs. The NPCs say they will kill the hostage or destroy the artifact if the PCs don't stop fighting for a minute. And they're telling the truth...
Once the PCs have lost several hostages or artifacts dear to them, they may start reconsidering their reactionary policies. And once they get in the habit of doing a little talking with the enemy, they may figure out that they can also initiate such communication in future combats.