You can set up your device to prevent other people from using it if it’s been reset to factory settings without your permission. For example, if your device is lost, stolen, or wiped, only someone with your Google account or screen lock information can use the device.
All you need to make sure your device is protected is:
Set a screen lock: If your device is lost or stolen but you have a screen lock set, the device can’t be erased using the Settings menu unless your screen is unlocked.
Add your Google account on your device: If your device is wiped but you have your Google account on it, the device can’t finish the setup process until your Google account information is entered again.
After your device is protected, you’ll need to either unlock your screen or enter your Google account password if you need to do a factory reset. This ensures that you or someone you trust is doing the reset.
Do not forget your Google account and password you had added to your device prior to performing a factory reset. If you can't provide the account information during the setup process, you won't be able to use the device at all after performing the factory reset.