I know this advice, but I wound up not following it, and it turned out okay for me -- in one situation. I wish we could come around to a policing culture where every story could end like this one. Sadly, we don't, and in many places the police have made themselves out to be the enemy.
I got hungry for a burrito one night at midnight in Tucson (a city of about 800,000; mixed white/Hispanic). Good thing, too, since there was a burrito shop three blocks down the road. I was reading an e-book on my netbook, so I grabbed my netbook and tucked it under my arm, and headed for the Taco Shop. Well, it was colder than I expected, so I started jogging down the road. It didn't occur to me, of course, that I looked suspicious, running down the street with a laptop under my arm.
Well, four cops confront me in the parking lot of the Taco Shop, wanting to know what the deal was. They were professional, and didn't make any aggressive moves toward me, put a hand on weapons, or touch me, but made it plain that I wasn't free to leave. They asked where I lived and what I was doing, and I told them. I said "I guess that does look suspicious. But this is my laptop. Can I show you some documents on it with my name on them, and show you that they match the name on my driver's license?"
The cop tells me to go ahead, so I do, and he says "Huh, guess it is your computer, then. Enjoy your burrito" and leaves along with the others.
Thing is, this is exactly what you shouldn't do when stopped by police in many places, since as you say their goal (often) is to find people and put them in jail. I could have said nothing, been detained, called a lawyer, and wasted a whole bunch of my time and a whole bunch of theirs. But, thankfully, I was able to take a risk that the Tucson police were better than that and try to demonstrate my innocence on the spot, and it paid off.
(Three of the cops, incidentally, were Hispanic; this wasn't a "white cops let the white guy go" situation. But there is far less racial animosity in Tucson than there is in places like Washington DC.)