The FBI did what the law requires them to do, they turned him over to medical health professionals to perform a mental health evaluation and the medical professionals found him to not be a candidate for further evaluation or admittance to a mental health facility.

Most of Anchorage's mental health facilities are at peak occupancy so unfortunately it is very difficult for all but the worst mental cases to end up admitted. I do not know if this was the case for the shooter or if he was truly found to be mentally stable.  Since the shooter was not deemed mentally unfit the FBI could not legally withhold his gun but for a short period of time.

The law is very lax regarding mental fitness and possession of firearms.  To me his domestic violence record coupled with his visit to the FBI should have been enough to remove his weapons for a much longer period of time.