I've read the comments and have mixed thoughts.
First - you did nothing wrong and appear to have a great relationship with your daughter. The fact that you are questioning if you could improve shows you are a great parent.
Where I have mixed feelings is with how the guy reacted. He had a concern about the well being of a child and he tried to address that concern. THAT is admirable and should be encouraged. If we turn a blind eye to any such concerns, more bad stuff could happen.
However, after asking you the first time if everything was OK, that should have been the end of it. He could have handled that differently as well - a confrontational "is everything ok" question does not really address his concerns. Still he should have seen your daughter was not in distress and was having a good time. There was no distress so this should have ended with a "I misunderstood, but at least I know the kid is safe" on his part. The fact that he kept going - even deciding that the officer was in error for not doing something - that is where the creepiness enters. And THAT is not your problem - it is his.
His behaviour changed things from a simple clarifying question to a potentially dangerous/emotional ordeal for the child he was trying to protect.
The woman in the car was probably in communication with the guy - the sheer coincidence of TWO strangers stopping like that in a short time frame with the same perception is just too great. So she was already biased by HIS perception.
You did nothing wrong. Keep doing things like that with your daughter - it will pay off and they grow up toooooo fast.