The issue of a write protected sdcard comes up often enough, it is surprising there isn't a guide how to diagnose the problem. In addition to the obvious write protect switch on the sdcard adapter used in a PC, there are two firmware flags in the sdcard standard that can be set to write protect the card: TMP_WRITE_PROTECT and PERM_WRITE_PROTECT. As these flags can not be set or unset using a standard USB card reader in a PC they are seldom used. However, the flags may be set or unset using the built-in sdcard reader of a Raspberry Pi. In particular, malfunctioning software on a Pi could set the write protect flag by accident. In addition, the card itself may also set one of these read only flags as a safety measure if it detects an internal error. If the TMP_WRITE_PROTECT flag is set, reusing the card is simply
a matter of clearing it. If the PERM_WRITE_PROTECT flag is set, things may not be so easy. There is also the PWD register, which holds a password. But as you can still read the card, it being accidently locked with a password clearly isn't the problem.