Welcome to Android Central! That's Factory Reset Protection in action. If a device is factory reset without the Google account being removed first, then after the reset, you have to enter that account's name and password. It's to discourage thieves from swiping a phone and then factory resetting it to make it their own.