Mac Big Sur home folder permissions: Read-only file system when renaming files
The problem is the double forward-slash in ${f/PCC-//}. Unlike a sed substitution pattern, there's no / at the end of the replacement pattern (it's terminated by }), so the extra / is taken as the replacement string. This turns e.g. &quot;PCC-ASR-L.Rdat&quot; into &quot;/ASR-L.Rdat&quot;, which (because of the &quot;/&quot;) is at the root of the filesystem... which is read-only.
When I'm doing things like batch renames, I also often don't get everything right on the first try, so I tend to do a dry run with echo in front of the mv (or cp or rm or...) command first, so I can see what's going to happen before actually running it. I also strongly recommend using mv -i or mv -f, so if there's any sort of naming conflict it won't just silently and irreversibly overwrite files. Also, putting double-quotes around variable references is a good idea, in case any filenames contain weird characters.
So my dry run would look something like this:
for f in *.Rdat; do echo mv -i &quot;$f&quot; &quot;${f/PCC-/}&quot;; done

...and if that looked right, I'd hit up-arrow to get it back, delete the &quot;echo&quot;, and re-run it for real.
If you need to troubleshoot in even more detail, using set -x before the command will show what the shell thinks is going on (i.e. what the command looks like after substitutions are performed) in cases like this.