No matter how cleverly an NPC is designed (in terms of Attributes, Peculiarities, and equipment), that NPC is likely to be flat and forgettable without an interesting personality and some understandable purpose.
PERSONALITY: This really goes without saying but, unless an NPC has a personality, he is likely doomed to be just another forgettable combat encounter or living prop. Moreover, an NPC’s personality is not particularly interesting unless it is somehow made apparent to the PCs. For example: If an NPC is a raving lunatic, the GM might seize opportunities to have the NPC cackle in the midst of combat, make insane comments, etc. If an NPC is bitter, the GM might have him regularly spit insults or complaints. If an NPC is vengeful, the GM might have him gush about how long he has waited to finally have his revenge, etc. Without such obvious personality “reveals,” the only one who will know the NPC even has a personality is the GM.
PURPOSE: Perhaps just as important as personality is purpose. I remember a game in which I privately commented to the GM that there was a lack of role-playing opportunities. The next thing I knew, our party ran across an NPC that had an interesting backstory and was happy to talk . . . but he had absolutely no purpose (i.e., he did not contribute to the story in any way, aside from telling us his story). This NPC might have been much more interesting had he arrived with a purpose (such as searching for a missing friend or loved one). The PCs then might have assisted the NPC on a side quest that made his backstory more significant and the entire encounter more memorable.
Often an NPC’s purpose will be simple, such as a barkeep whose purpose is to run a bar, or a merchant whose purpose is to sell goods. Even then, however, a more unique purpose can make for a more memorable NPC. For example: Maybe the NPC barkeep is fed up with the town’s tyrannical ruler but is unwilling to oppose the ruler openly. Such a barkeep might keep his ears open for those that share his views and might prove to be a valuable source of information or resources in addition to an excellent role-playing opportunity.
The importance of purpose holds true for villains as well. The old trope of an evil mastermind willingly divulging his goals and plans to his enemy can be an excellent role-playing device, as it serves to relay to (or confirm for) the PCs that the villain actually has a purpose. Without such a clear purpose, the villain risks becoming just another forgettable boss at the end of another forgettable dungeon/mission.
As a final example of these points, my friends and I recently completed a reasonably long (and very enjoyable) adventure in which an insanely powerful member of the dark fairy-folk had created a magical device that threatened the entire land. No matter what we did, this NPC villain was several steps ahead of us . . . and his tricks and schemes presented interesting challenges for us to overcome. The biggest problem was that, as far as we could tell, the villain had no personality and no purpose . . . other than being evil. Even in the final battle, where the villain stood unmolested at the back of his forces, he didn’t taunt us, threaten us, or really say anything at all . . . and he certainly never revealed what drove (or inspired) him to engage in such a sinister plan. So, while the adventure itself was memorable, the main villain was not. And he very easily could have been had the GM taken steps to demonstrate the villain’s personality and purpose.