As the link that razmee209 provided indicated, having Photos connected to iCloud makes Photos on your devices (those that are also syncing with iCloud Photos) all have exactly the same pictures. When you take a picture with your phone, for instance, the iPad and Mac get the picture, too. And when you delete a picture from your phone, it is deleted from the other devices, as well.
So you can't think of iCloud Photos as a backup-- it's not a place to archive pictures. If you mistakenly delete a picture, you lose it everywhere. Of course, deleting a picture really moves it to "Recently Deleted" where you have 30 days to change your mind. But if you permanently delete it from "Recently Deleted," it is gone everywhere for always. Apple provides "Recently Deleted" because we all mess up, sometimes. So delete from there only with great care!
If you don't want your devices to be synchronized, then you need to disconnect Photos from iCloud. In iOS or iPadOS you would go to Settings>Photos and turn off iCloud Photos on any device you don't want synchronized. You could un-synchronize only some devices and keep others connected to iCloud if you like.