The first image is from Settings > iCloud
This is a list of your iCloud services and main applications which sync data for use by the same apps on any of your devices signed into your iCloud account. Messages, for example, will sync from your Mac to iCloud and then from iCloud to your iPhone (should you have one).
The second image is from Settings > iCloud > Drive > Apps Syncing to iCloud Drive
This is a list of applications on your Mac which access iCloud to deposit data which can be retrieved by other iterations of the same app on different devices on your account. Some of these are listed in the first of your images as part of your iCloud service apps. The applications in this display can be by developers other than Apple.
Both displays can also be accessed by clicking on your Apple Account name at the head of the list of settings in Settings.
Regarding your query about Photos - the toggle in both displays achieves the same result which is to turn on or off syncing of your Photos app from your Mac to iCloud.