There have been numerous people posting the same issue, and that response I posted was marked by Apple as their recommended response. My understanding is the instructions are laid out to each user when they, deliberately and interactively, request their AppleID be deleted. If they fail to follow the instructions, then yes, there are significant consequences.
The OP would know if they requested the AppleID be deleted, and they would have gotten the cancel code if they did so. They also would have gotten the confirmation message once the AppleID was deleted.
And once an Appleid has been deleted, there is no means to sign out of iCloud any longer, and Apple cannot do anything as they cannot resurrect a deleted AppleID. Deletion is permanent.
And Apple never unilaterally deletes anyone’s AppleID. Users have to sign into their AppleID and formally request it be deleted, with the consequences of doing so being spelled out to them at that time. But as far as I know, Apple does not check that they followed instructions, nor has any means to do so independtly or remotely. Following the instructions is up to each user to do so when they make the deletion request.
This is is at least the fourth or fifth such post about this I’ve seen in the last week or two. And in those cases, yes, the poster did request their AppleID be deleted, and no, they did not follow instructions, and yes, they now have an unusable device.