Electronic locks are often quicker to access than mechanical locks. It takes only a few seconds to punch in a code rather than turning a dial to find numbers. In an emergency, such as a burglary in which you are trying to access a gun safe, this could mean the difference between life and death. Lock combinations are easier to change than is the case with mechanical locks.
Mechanical locks aren't subject to electrical failures. You can reasonably expect to get as much as ten or more years use out of a mechanical lock without worrying about electronic upgrades or constant maintenance.
If there are electrical failures, or if your batteries wear out, you may not be able to access the items inside your safe. A professional would have to drill into the safe to get it open. Some manufacturers may make the lock with a physical key alternative. Batteries must be changed regularly, at least once a year.
In an emergency, it takes a lot of time to turn the dials to find the combination on a mechanical lock. Tumblers inside mechanical locks can seize and stop working. Owners often forget to turn the dial after opening mechanical locks to reactive the lock sequence resulting in easy access for burglars.