If you ride a bicycle at night without a light on, you are technically breaking the law.
It is one of the favorite techinicalities of the police when they stop you for questioning at random on the street.
Every now and then, the police are put on enhanced surveilance mode (such as during a major diplomatic summit or international sports event). At such times, the cops need something to write on their log books to show that they are working. So they stop people at random and ask what they are doing.
This is called "shokumu shitsumon". I don't know what you would call it in English. Sean Connerly does this to Kevin Costner in "the Untouchables" when, as a cop on the beat, he catches Costner throwing trash into the river.
If you watch the news a lot, you will see every now and then a story about an astute policeman who spied some suspicious person and performed a "shokumu shitsumon" during which the suspect freaked out and the cop pulled him for resisting arrest - and it turned out to be a serial child molester or something. So it's not completely a waste of the taxpayer's money.
It's a pain though, when you get stopped and asked where you live and what you do for a living at random.