Why is my iPhone still listed in iCloud though I erased all content and settings on the device?
As described in this Apple support document, you should have signed out before deleting the device.  The article provides also alternative methods (in case one has no control of the device).


If you're using iCloud and Find My iPhone on the device, sign in to iCloud.com or the Find My iPhone app on another device, select the device, and click Erase. After the device has been erased, click Remove from Account.

If you can't follow either of the above steps, change your Apple ID password. This won't remove personal information that's stored on your old device, but it prevents the new owner from deleting your information from iCloud.