Generally not correct, as shown by the research done by John Lott.
The reason they seem to be happening more often is because of the copycat effect, which is known by, and promoted by the media.
The guy was already recognized as running off the rails, but nothing, NOTHING, was done in a timely and proactive manner.
This did not come out of the blue, and it had nothing to do with either the NRA or the enforcement of existing gun laws, in California or anywhere else.
This is a failure to adequate respond to increasingly erratic behavior, and that falls upon the local authorities, to whom this person was known and had a history, and to family and neighbors, who were well aware of the progression of the derangement that led to this fury and chaos.