I encountered the same issue it seems that the reason that this happens is that you need to sign the device out of iCloud before you delete the content and settings (unfortunately Apple do not tell you this in their instructions on what to do before selling your phone).
Fortunately I discovered this before I sent my iPhone 5 off for sale. To delete it I had to restore the iPhone using my iTunes / iCloud backup. After you have completed that:-
Go to settings > iCloud
Scroll to the bottom and click on Sign Out
It brings up a warning about deleting documents click sign out again
You are then asked to enter your password - do this and click "Turn off"
You will now find it has been deleted from iCloud.
Of course you then need to go through the process of deleting all documents and settings from your phone again.
I appreciate this does not help if you no longer have access to the phone I could not find a way to delete it remotely either.