By default the special or default folders are protected, see the `protect_default_folders` config option. This is because changing their name would change the special folder assignment and also because by default the names of folders defined as special folders are localized, see the `show_real_foldernames` which is visible in the UI under `Special Folders > Show real names for special folders`. Also you have the case where an IMAP server will always provide the default folders so renaming them will not achieve much (e.g. the special use folders).
So you have a couple of ways forward the simplest is probably remove your SPAM folder from its assignment in special folders and then rename it to what ever you want. Then make sure you have `show_real_foldernames` set to true and assign it as a special folder.