Doesn't surprise me, as someone who lived in Japan for 3 years and knew plenty of others with 10-15+ years there, very typical to be mistreated by the police as a foreigner.
In saying that, you usually need to just apologise for anything that we in the west would know as a misdemeanor, a low level crime.