Nor does the police have the power, nor should they be accosting and harassing the individual, if there is no actual breaking of the law.
The next step is stopping everyone, just to see if they have a weapon on them.
The gun laws in NYC being what they are, stop-and-frisk is an excellent way to prevent crime. It's one of the reasons crime in NYC is much lower than in the South, despite a demographic profile similar to many big southern cities. This isn't a body cavity search - it's a quick pat down similar to the kind people get at airports.