Pro tip: Use a read only rootfs and use overlayfs to write any changes to ram instead of the SD. Then you just gotta put your state on a USB drive, network etc.
Likely worn out sectors. Sadly such products are easy in that they don't have a read only file system, but for the majority of users that would help. Maybe there should be a simple script called "finalize" that turns it read only
Didn't there use to be a physical read lock on SD cards?
I know "modern" cards have no space, but if it's important to you, you can still use the full size adapters which should (all?) have the physical lock. Super glue that in place...
There's a flag you can set electronically, to make the card read only, but if the OS isn't set up to support running from a read-only filesystem, setting the card to read only will make the OS crash. If the OS is set up for a read-only filesystem, it won't try to write to it, regardless of the flag.
Setting up Linux to run from a read only filesystem only takes a handful of commands, but having a tool to automate it would be nice.