This is a bit weird, but the game I have the closet affection to the NPCs is Command and Conquer 3 (the 360 version as my computer probably couldn't run it on lowest settings).
When I play the skirmish mode (the multiplayer, it can be played with bots), I have a deep attachment to my units, especially the Firehawks (the bombers for GDI) and any unit that gains any distinction in battle (gained a rank). If any unit of mine gains a rank in battle, I will immediately remove them from battle and send them back to my base and keep them there for the rest of the game, no matter what.
The same goes for my Firehawks, whenever I launch them to bomb a target, I will have them return to base without attacking if the target is in anyway protected by AA units, often causing me to launch a much larger scale attack on the target from the ground or just letting it be until later.
It's quite interesting, while I don't care about the fate of the majority of my units, but the select few that I care about, I will sacrifice the rest of my army to keep alive. I also do this is Civ Games, but I justify it as 'protecting my cities'.