This is not uncommon since many players come from video games, wantonly stealing from and murdering NPCs. NPCs in roleplay games tend to be smarter though, and have logic. 

**Give them a reputational cost.**

They didn't interact with anyone else. If they check their wallet after, they'll know that it was probably that thief who stole from them. So what do they do? Not fight a bunch of murderhobos. They go to the pub and complain about these so called 'adventurers' who rob and steal from everyone they meet, and then in that village or town, people refuse to serve that thief and anyone associated with them for fear of having their stuff stolen. Don't make it universal, unless they repeatedly do stuff, but if they harass NPCs, NPCs won't want to talk to them unless very seedy, and quest givers won't give them useful info.

If they had failed the check, the NPC would slap their hand away, swear at them, and march off to tell people how untrustworthy the adventurers were, unless she really really needed them.

**Explain morality.** Make sure they know being a thief doesn't mean they are supposed to steal from everyone they meet. Allies are supposed to be safe- just as being a fighter doesn't mean you stick your sword in random allies, being a wizard doesn't mean you turn the local cleric who heals you into a frog, being a thief doesn't mean random stealing.

**Give them a common sense check.** Sometimes it would make sense to steal from an ally. A sufficiently mercenary group might want to steal from an ally if there is a valuable enough possession, and that's a quest and a heist. If their ally has a rare and powerful magical item, maybe they can get it off them, and maybe it's worth the reputational cost. A few gold probably isn't worth that risk.