The gunman who killed a teenager, shot at officers and then killed himself was never supposed to be near his victims.