Usually the reason is that the iOS version information is too old and the erasure is attempted with an unsupported iOS version. Apple usually signs only the two latest iOS versions and erasure with any older iOS version is not possible.

In this case, the device icon goes to "Requires attention" status and there is a pop-up "New version information required" with options to download new version information ("Download now") or stop erasure ("Stop"). The "Download now" option is recommended in this case.

Version information is automatically after the configured time period (Settings > iOS > Automatically update version information…), but can also be done manually by selecting Settings > iOS > Download now > Update now.