This has never happened to me in 14 years of living here but I do know people who were subjected to a random ID check while walking through Ueno station. (Two caucasian males. Casually dressed, with nothing "provocative" in their appearance. Just walking through the station. Not doing anything suspicious). The police officer told them that he was checking for "overstayers."
According to Arudo Debito, the law states that the police should only ask ID if there is a suspicion of crime etc.:
http://www.debito.org/instantcheckpoints2.html
With this in mind, you should ask the police about their reason for subjecting you to the ID check. However, as a visitor you are required to carry your passport. A photocopy would be enough to get you out of the situation very quickly.
Originally Posted by
abmj-jr
As to the passport, why do you not have it in your possession as is required? That is just asking for trouble, regardless of what country you are visiting.
Believe it or not, you can walk around the UK with no ID at all.
Originally Posted by
smithrh
...I thought the passport was supposed to stay with the hotel desk?
Definitely not. The hotel desk will ask to see your passport. But you keep it.