Oh, do gun safes have batteries?
Biometric ones do, as do electronic combination safes. I have one of each. While it is possible to get in with a key too, I can open either safe without searching for a key, and other people can't, as long as the batteries are good.