This might surprise you, but there are very often situations where the police and the public are remarkably aware of the facts of the crimes being committed, but unable to do anything about it. Drugs fall into this category. Everyone knows that "that's where the deals go down" and "that's where they count the money", but that's only because we're not completely stupid. Proving direct culpability, on the other hand, is an entirely different story, as is proving the culpability of people who matter. (Street level dealers, for instance, are pretty interchangeable: one gets shot, you get someone else to do his job. Ain't no thing.)
If you find a druggie on a corner, it's not exactly a stretch of the imagination to recognize he's probably guilty of possession. It's also sort of pointless to prosecute him, since the actual issue you're fighting is lots of people taking particular drugs, which means what you care about are the people managing the city-wide operation. You want evidence of that crime? That's also the druggie on the corner. Half of whom can tell you exactly who it is who manages the city-wide operation. None of which are willing to take the witness stand to accuse him in a court of law. Because he knows that he goes right back to that corner the next day and not only does he no longer have someone bringing him drugs, but he's also get a bullet in his head for the trouble.
If you want a visceral primer, watch The Wire.