What you are looking at is the static permission to get read/write access to the shared storage (
Since about Android 6 this static permission you grant by installing the app is no longer enough for actually accessing the files on the shared storage. Instead the app has to additionally ask you to get access to those files at run-time. And this time you can chose to deny access. Additionally apps usually ask for this permission at that time when they really need it. This means if access to shared storage is only required for one functionality you never use you should not see this permission request dialog and thus the app never gets access to the shared storage.
But if you get this permission request and you allow it then the app has full access to ever file on shared storage including your stored photos. An app can do anything it want with files it has access to, including sending them to a server in the internet.
Google also recognized that "all-or-nothing permission" was not a good decision. Starting with Android 10/11 the way to access devices shared storage has totally changed and now allows to grant/deny access on a finer granular level.