The usual reasoning I've heard from LEOs for pulling people over for minor infractions (broken or not bright enough tail light, crossing a line too far, rolling stop on empty road, etc) is an excuse to check for other infractions like drunk driving. I've been told more than once that they can find something wrong with every single driver, especially if they turn and pull behind you because people get tense and 'swerve' a bit too much. If they suspect more (wrong person, wrong car, high drunk driving time, high crime road, etc) they can find any excuse to pull you over.
Some of that is Location, Location, Location, but time of day is a biggie. And yes, if they follow you long enough, well, you'll have a hard time driving their entire shift without giving them some reason to pull you over. However those with outstanding warrants get nervous, bail jumpers, probation violators, people carrying drugs or other things they aren't supposed to have, and even those who may not have acquired the vehicle they are operating legally, will get nervous sooner. Nervous people make mistakes.
As for lights, I was told by one patrol officer that (for example) one in four people driving in town (well lit, streetlights) without their headlights on at night are operating DUI. Hmm. I'd say that might be a screening criterion. Add in a vehicle with body damage, broken taillight lenses, and showing the general malaise that heavy drinkers seem to inflict on their vehicles, and I'd give that a nod as a checklist item, too. Of course, area, time, and skill of the operator factor in. Druggies can go either way, with some vehicles a rolling recycling commercial, others fine and shined. A vehicle that looks 'too good' for an area might be just as much a tipoff as one that looks shabby.
Now, those are criteria for increasing the odds that someone is DUI. They might just be poor, bought a beater, or inherited the car from their drunk uncle and are working their way along the 12 steps to getting out of poverty. Good for them. But just as we might be more likely to suspect some guy in a burnoose named Ahmed at the airport of being the next guy to try to take the plane, these are profiling criteria. You don't want to be profiled, learn and avoid the 'look'. In the meantime, drive well, and some one else will likely get their attention.
There are plenty of people out there who drive like idiots, and one is almost sure to come along. Make sure your stuff works like it is supposed to--all lights, signals, etc., and that the tail light lenses aren't broken. If you live someplace that seems to happen often, get some of that red taillight tape they have at Walmart in the auto section and put it in the glove box, so you can patch over the hole until the lens can be repaired/replaced.
Now, I am not a LEO, past or present (I'm former Fire/Rescue, long ago and far away), nor am I in an adversarial relationship with the local/County/State constabulary; I know every policeman by his/her first name ("Officer", or other rank or designation if they correct me). I don't make it a practice of getting pulled over, either, because I check all the lights periodically, do vehicle walk-arounds and look for damage I am not aware of otherwise, and in general, make sure there is NO reason to pull me over.
Not drinking helps, too.
If it happens that I am pulled over, though, it's hands in plain sight, no sudden moves, make sure what I am doing is in line of sight for the officer, do what they say, calmly and gently, and we'll all go home. Make sure you know where your license, registration, and proof of insurance are. Be polite, even congenial. (A soft word turneth away wrath). Inform them calmly of any surgical wound, illness, injury, or disability you have if it will interfere with complying with their requests.
Are some officers heavy handed? Intimidating? Yes, to some degree, but from the other side of the badge, I can see where that stops a lot of crap before it happens. ME staying calm helps
them stay calm, and that makes it easier to sort stuff out.
If you want a problem, if you don't already have a bad day and insist on having one, get pissed off. By all means, don't hold back, call the policeman names, and make sure you remind them about how you pay their salaries, they really like that. If you have the connections--or even if you don't, threaten them with the loss of their job because you know powerful people in high places. Tell them how that will hurt because they are not smart enough to fill out the application for the next job. Liberal distribution of spittle, thrashing around, and shouting creative and profane comments about their ancestry, dining habits, sexual practices, relationship with the family pet(s), K-9, and/or stray or barnyard animals, comments on intelligence, or comparisons with anatomical parts of any organism will only enhance your experience.
These guys have a tough job to do. We complain if they don't seem to get it done well enough, often enough, and then bitch if we happen to be the one pulled over.
It doesn't do anyone any good to contribute to the Us v Them mentality brewing out there and getting worse with events like those in Dallas. It will be ugly enough without that.