NPCs should have a sense of self-preservation. Don't just line them up willingly, ready to be killed by the PCs.

Some games have morale rules to handle this. If an NPC is in danger, the GM makes a roll against some sort of bravery or loyalty or morale stat,
and the result determines if the NPC stands his ground or turns tail and flees.

As a PC, you naturally want to encourage your enemies to hang around and fight, rather than flee. So you should do stuff to improve
their morale, like complimenting them on their armour or offering them chocolates.