The guy (a 37 year old Japanese man) had a gun permit because he was askeet shooter. That explains the gun. There are also a lot of reports from people in the neighborhood that say he liked to walk around carrying his gun out in the open. There were several complaints to police from neighbors asking them to take his gun permit away. Now there are investigations beginning to look into claims that the police did not follow up properly on the complaints.
This (and the recent spate of gun-related crimes) could lead to even stricter gun laws in Japan.
This article goes a little more in depth and talks about some of the odd behavior his neighbors were concerned with.
This article calls into question the early news reports’ claims that the female fitness instructor killed in the shooting had been stalked by a foreigner. It seems that the stalker was(the shooter) himself.