Other than the built-in backup function in iOS and iPadOS, other functions in iCloud synchronize data across devices. So iCloud photo is not a backup. It is a system to sync any and all changes on any device to all other devices. Similarly for Contacts, Notes, files in Pages or Numbers. Those files in iCloud Drive get synchronized across devices. Since that sync function includes deleting photos or files, those services are NOT an archival backup of files.
So if you use iCloud photo it is still recommended that you make and keep archived backups of your photos somewhere else -> Set up and use iCloud Photos - Apple Support (my underline emphasis added).
”Download copies of your photos and videos
When you turn on iCloud Photos, your photos and videos automatically upload to iCloud. They're not duplicated in your iCloud backup, so you should keep backup copies of your library. Use the steps below to download copies of your photos and videos to your Mac or PC. Or you can import your library to your Mac or PC.“