OSs need to stop letting applications have a free reign of all the files on the file system by default. Some apps come with apparmor/selinux profiles and firejail is also a solution. But the UX needs to change.
replies(5):
All except macOS let anything running as your uid read and write all of your user’s files.
This is how ransomware works.