If you have enabled automatic backup and delete a photo or video on myCloud, it will also be deleted locally from your device. If you have enabled iCloud on iOS devices, the image will also be deleted here.
This way, you will have the same updated data on all your devices and will not have to delete the same photo or video more than once. It also ensures that the same photo is not uploaded to myCloud twice.
If you don't want the photos or videos to be automatically deleted locally, you need to turn off automatic backup. You then have the option of deciding whether you want to delete the photo or video only on myCloud or also locally. However, your photos and videos are no longer automatically backed up to myCloud.