As a dog owner, I wouldn't like an off lead dog standing near me and barking at me. Barking at people isn't a friendly behaviour is it? So I'd be a bit apprehensive of what it's next move was. I especially wouldn't like it from behind me. Ever had a dog chase you from behind, OP? It's fucking horrible. Had it with a rottie when I was younger. Also had it from a dalmatian when out jogging. Also had it from a yorkshire terrier that tried to bite my foot.
I'm a dog person - yet even I'd feel uncomfortable with that. It doesn't matter how small or cute you think your dog is. Ever been bitten by a small dog op?
He doesn't know your dog - so is judging from the behaviour presented infront of him. And your dog was barking at him.
I've mentioned elsewhere my dogs are rescues, don't like people (as in, they generally don't want anything to do with them until they've got a chance to know them a bit) and they certainly never, ever bark at a stranger whilst walking in public places, much less off lead. One was highly reactive when she arrived, and would bark just outside of our front door - I nipped it in the bud fucking rapidly. It's intimidating to people who don't know the dog.
You absolutely should train it out, or keep her leaded if she can have a go at people (barking) when she doesn't like what she sees, such as someone wearing a bloody hat or whatever. Then at least folk know your dog can't hurt them, and they won't feel threatened.
A lot of people will feel threatened by a dog barking at them when off lead, in a public place when they are simply going about their business. They have a right not to be made to feel this way.
If I thought a dog was going to go for me because it was barking at me, and near my feet or whatever, and I genuinely felt threatened, I'd absolutely kick it away. Keep your dog under control and don't let it get in that situation.
If you're responsible and have good recall (which you absolutely should have if you're letting her off lead in public) then it's not hard to call a dog close to you when you see people near, or are distracted. Both my dogs sit and won't move whilst I'm bent over picking up their poo - they know (because I trained them) that they have to wait, stay near me, and we can carry on once it's done. If I'm bent over I can't see folk, horses, other dogs, kids, or whatever else coming.
The guy told you he'd been bitten in the back of the leg by a dog - he was obviously worried, OP. Honestly, the amount of owners who don't get this into their head, give the rest a bad name. And even worse when they think it's fine because their dog is small.