Gun Locks are an important part of gun safety and security.
Best of course,would be a burglar and fire resistant gun safe, which is not always an option.
In many places gun locks are reguired by law. Common sense would also require them.
When properly installed most will prevent the gun from being fired.