New Yorkers have soft spots for dogs and babies, and feel completely free to wave at, coo at or even make eye contact with them, which is otherwise unheard of. I suspect one reason is that a direct and positive response is likely to result, whereas one can never be sure of that here with a human over the age of three.
I've now been able to experience the receiving end of this for a whole couple of days, and there is an added benefit to the "parent" - a certain pride in your little one being acknowledged and appreciated.
However, one should never make assumptions. The other night I was out with Cassie, and a man started praising her beauty, her walk and her smile from ten feet away. And then, as I passed him, he added, "And your dog's cute too."