I'm not sure what you mean by "backed up my iCloud photos to an external SSD." What did you actually do? Did you use Time Machine? Did you copy your Photos Library.photoslibrary to the drive? Did you download images from iCloud.com, or did you download originals from there? Can you be specific?
I'm also not sure what "deleted the content of Pictures on my iMac." means. Did you delete everything in the Pictures folder on your Mac?
I get that you find iCloud confusing, and you're hardly the only one. Are you syncing iCloud Photos, or iCloud Drive or what? And have you turned on "Optimize Storage" on your devices? Including your Mac?
We may be able to help, but we need to know what you actually did.
( I'm not sure I need to say all of the following, and you didn't ask for this-- please ignore as necessary…)
Except for the mobile backups, iCloud is not meant as a backup service. The reason we use iCloud Photos and iCloud Drive is so that this makes our stuff available on all of our devices.
iCloud Photos is a synchronization service. When you engage iCloud Photos on a device, then the Library on that device is kept exactly the same as the iCloud Photos Library. So, for instance, if you take a picture with your iPhone, it is added to the iPhone's Photos Library, copied to iCloud Photos Library, and then copied to the Photos Library on each of the other devices that you have connected. If you delete a picture on your Mac, then that picture is deleted at iCloud and on all the other devices.
So you can't think of iCloud Photos as a backup service, since it backs up mistakes, and there's no way to undo them. Whatever you do with Photos on your device-- it happens everywhere else.
Another use of iCloud is Optimize Storage. You can set this on any device, independent of the others. If you set a device to "Optimize Storage," then Photos may store only smaller images on the device and rely on iCloud to keep the full sized images. Having screen-sized images stored locally allows you to quickly scan through you pictures while saving lots of storage space. And, if Optimize is chosen, and you want to Edit a picture, Photos will reach out to iCloud to get a full sized image for you to work on. Your optimized Library may take up less than 20% of the space of a fully downloaded Library. But an optimized Library may be kept larger than that if the extra storage space is not needed.
Beware, though: backing up a Mac Photos Library with Optimize Storage only backs up smaller images. If you want to keep a true backup on an external disk for safe keeping, you need to have Download Originals checked. I use Optimize on my phone, but not on my Mac.
If you need something other than synchronization and optimizes storage, then iCloud may not be for you. The only things I sync with iCloud are things I also want to see on my Mac, phone, and iPad.
iCloud Drive is similar, but for files, and Optimize works a bit differently. See this:
Understanding iCloud Drive - Apple Community