My wife and I were in such shock that we didn’t intervene. It’s been bothering me all evening. I’m furious at myself for not speaking up, but I’ll admit part of it was just not wanting to come off as rude. I’d die for my little girl, but I didn’t keep a stranger from hugging her.
Don't sweat it. Parenting is an adventure in learning. I had an issue earlier this year where an adult started chastising my 10 year old son about something. At first I was caught off guard and didn't think the guy would keep on like he did. I waited for the people that were there running the organization to step in. Nothing happened and it went longer than it should have. I did step in and ended it making it clear he would never speak my son that way again or any child if I was around. Still I felt horrible for my little guy as he didn't deserve what happened.
I spoke to my son later and apologized for not coming to his defense earlier. I explained the situation to him and he was fine with me and told me it was okay. I told him I was proud of him for being respectful and taking it like a man. A lot of parenting is trial and error. I can totally see how this would upset you that it happened and that you didn't feel your response was fast enough or correct. I think the fact that you are aware it made you uncomfortable is the sign your on the right track of parenting. As @Cowcatcher said have a talk with your child and explain that its okay to politely tell strangers no thanks. While probably 99% of people are just overstepping and not a threat. They still don't have the right to touch your child.