Apple associates devices with your Apple ID. If you are using two factor authentication they get authentication requests. If you wipe or sell or dispose of a device you really want to remove it from this list.
Go to https://appleid.apple.com/account/manage, select the device, and remove it.
I don’t think the reset/wipe phone setting does this automatically.