Well, cops would be involved. While walking my dog in the woods (pacific northwest, about 500m from the nearest road) I came across a young kid. She spoke no English and was clearly separated a tour group. Sun was setting. We had maybe a half hour before flashlights would be needed but my dog and I knew every tree. I wasn't sure which path she came from. She wanted help, but if I lead her back to the road I would be the one explaining my actions to the police. So I left her in the woods. (No. After some shouting into the woods, a member of the tour group came running.) My point: In the west, our fear of being accused of something nefarious can actually cause us to hesitate even when child is literally lost in the woods.
Japan is also a highly conformist and homogenous society with very little ilegal immigration.
I never said foreigners commit crimes, as if locals do not, but being very selective with your immigration does help keeping crime lower in every country that does so.
As a country you already have the crime rates of the locals, so you want to not import crime rates as well, therefore you want your immigration being a net positive across the board so you'll have to be very strict.
Why are people offended by an obvious fact?