The Muslim attackers in San Bernardino left behind more than a dozen bombs in their home, they didn't seem to mind that constructing such devices is strictly against the law.
Their rifles were obtained by a third party, this is called a straw purchase by Federal law. It is a felony. So is murder.
So exactly which laws do you think they would have obeyed?
Perhaps Sharia law?
France prohibits ownership of automatic rifles, that didn't really help the hundreds of dead and wounded.
What we are left with is the understanding that governments cannot stop all criminal and terrorist attacks regardless of the laws in place.
The only logical conclusion is that citizens must take a more proactive role in self defense. There is strong evidence that many are already doing that and it seems to be a growing trend.