Just like there are high end combination locks, there are also high end electronic locks. If you're buying a 'safe' from a typical big box store, you're getting neither.

We've got some high-end TL rated safes, and they're a totally different animal from most of the consumer garbage out there. In these security rated safes you can get high end S&G electronic locks, or even KABA locks, which are electronic, yet require no batteries.

On the high end, electronic locks can do things mechanical locks can't. You can set time delays (so the safe will only open during business hours, even if you have the code), you can track dates and times the safe was opened (as well as who it was opened by if you give them an individual code), you can set it to lock out after a certain number of failed attempts, you can set it for dual mode (essentially requiring two people to open it), etc.

Basically, depending on what your needs are, electronic locks can do things mechanical locks can't even dream of.

With that in mind, if you're buying a cheap firebox or even a rated RSC for your home, you're probably better off with a mechanical dial lock. Even the low-end ones are relatively simple and robust, whereas low end electronic locks often aren't.