He saw an abandoned bike in a field and took it home to get rid of it. The police definitely overreacted, and you just showed by 'broken windows' policing has a whole problem with implicit bias as the police seemed pretty prejudiced for him being a foreigner even though no crime was actually committed.
Every bike in Japan needs to registered with the police. Also, there are very specific rules governing abandoned property. Just saying “well no one else was using it” isn’t proof of the absence of a crime.
It wasn't for him to decide if this bicycle was abandoned or not. When you live in Japan you learn very fast how the law works. You do not touch anything that is not yours under any circumstances. In situation described as above you do not take the bike. Instead you call the police and report that is has been abandoned. It's trivial, really. And yes, maybe police was a bit prejudice in this case. But statistics and practice shows that vast majority of Japanese would not take this bike and this I can confirm first hand. Overall I think it was a good lesson. No harm done to anyone but the OP will remember for the rest of his life that he should not touch what's not his.