...didn't say that "just walking down the street" was the violation in question. You are not much different from the Hippies in the sixties. They knew all about the law too.
...being out at 3am? Depends on where ya are. It can be suspicious enough to warrant being detained.
...suing a cop is like suing a turnip. Even if you win there is nothing to get and if ya lose ya has to pay for your own attorney and his.
...cops ignorant of the law? They are as knowledgeable about the constitution, laws as well as obscure rules and regulations as you are. They can also be as pleasant or unpleasant as you can be.
...cops weakness? They are lazy. If you don't go out of your way to be annoying and unpleasant and show at least moderate courtesy ya will be on your way in a short period of time. Or they can make a simple traffic ticket take a couple of hours.