Why I get the message “This device was reset, to continue to sign in with a google account that was previously synced on this device” after factory reset?
Google has introduced a new security feature in Android version 5.1 that is designed to protect smartphones even if they are stolen and the thief performs a factory reset.
In this case, all data is normally deleted from the device and the phone is reset to its factory defaults.
However, in order to prevent unauthorized access to the smartphone, Google has introduced the so-called "Android Factory Reset Protection" (FRP). This means that after a factory reset, the last Google account used on the device is requested before the smartphone can be used again.
A factory reset does not help a thief much, because even afterwards the device is not yet freely accessible.
Only after entering of the Google credentials smartphone unlocked again.
If the security message appears and the security code or Google account is no longer known, you only have the option to restore your credentials via Google.
Link to Google Support: