I've thought this over a lot.
I think it just comes down to promoters being unbelievably people-smart. Seriously, I think this career requires more in the way of street smarts than even most business jobs, because you have to be polite and well spoken enough to impress the local authorities and land/business-owners, hard enough to not get fucked with by a largely outside-the-law clientele, and business savvy enough to deal smoothly with head-swelled entertainers who lie about how sellable they are.
You can bet that any promoter who has any chance of surviving has 'reached an understanding'

with the local police. I don't count any promoters as friends, but I've met a few in passing. These are people who are not in the least way scared or able to be intimidated, even walking into the private offices of people who very much do not approve of what they do or who they serve, and have the power to take them down.
Many promoters I've met claim to never use drugs (anymore). Whether this is true or not is irrelevant, because the point is it's a politically smart thing to claim, for the sake of the scene's survival at the mercy of the authorities.
I think most of the cops you see at medium to large sized raves are there on a quid pro quo agreement with the promoter(s). We won't shut down your party, and won't dig deeper than the obvious when picking off criminals, as long as you allow us to maintain a visible presence there, and your party doesn't damage any property or disturb anyone outside.
Another way to look at it is this: Law enforcement, on some level, knows that they cannot ever get rid of a drug-using subset of the population. So the best they can do is corral them all together and let them do their thing under supervision. Any LE spokesperson would be hard pressed to admit this, though.