Funnily enough, failing to pickpocket an item or being detected when searching someone's belongings causes fright in most unarmed NPCs and makes them run away and scream "please don't kill me", "don't zone me out, bro". They probably should call others/guards for help (if there are any), or always attack with some initiative bonus in this case.