How did my photos get transferred to my new iPhone even though they weren't in iCloud? I bought a new iPhone to replace my old one.

My iCloud had been full for a while because of photos. So I took care of that first before doing a device backup to iCloud.

Before powering on the new one:


I disabled photos sync to iCloud and deleted all photos from iCloud.
I performed a device backup to iCloud.
I confirmed that iCloud showed no data was being used by photos, and that the backup had finished uploading.


Then I powered up the new phone. During setup, I did the "hold phone near each other" sync process, and part of that process prompted me to download the backup that I had just made (I did so). I finished setting up the new phone, and then powered down the old phone. I completely powered it down (holding down the button). I have not powered up the old phone since.

After that point, I checked my photos -- they were empty. No photos.

Many hours later (at least four), before bed, I checked photos again. Still empty, no photos.

The next morning, I checked my photos. Suddenly, they were all there. And I mean all of them, not just the recently-deleted ones that used to be in iCloud. I know this because my iCloud has been full for at least 6 months and has long since stopped syncing, but there were photos from last week.

I'm certainly not complaining, because I planned on finding a way to transfer them over anyway, but I am surprised, confused, and a little bit weirded out.

How did my old phone's photos end up on my new phone, even though they weren't in iCloud and my old phone has been completely powered off the entire time?
iCloud keeps your photos, and other documents, in the trash and ready for recovery for 30 days after they're deleted.  

Depending on how many photos &amp; files you have in iCloud, it can take hours or days for a sync to complete.  You didn't indicate if you deleted the photos from iCloud.com or from a device.  You also didn't mention if you had other devices signed-in to the same iCloud account.  It's important to note that iCloud doesn't do real-time syncing of files.  It does it on its own schedule.

When you deleted the photos in iCloud, they went into the Trash.  They were deleted but not technically deleted because iCloud allows you to recover items in the Trash for 30 days.

I'm guessing (and I can only guess here, based on the info provided) that the iCloud deletion of the photos was registered after it did the restore of your new device.  If you have other devices signed-in to the same iCloud account, they might not have received the 'delete' message before you connected your new device.  Therefore, the new device got the "sync all photos" message before getting the "delete all photos" message.  

Confusing, I know.

Go to iCloud.com and verify your photos are in the trash.  If not, you can delete them (again).  Also, you can do a permanent delete from the trash on that site.  

Then allow your new device, and all other devices, to sync again.  This could take several hours or a day.  When that's all done, your photos should be deleted from iCloud as well as deleted from all other signed-in devices.