Whether a file can be deleted or not is not a property of the file but of the directory that the file is located in. A user may not delete a file that is located in a directory that they can't write to.
Files (and subdirectories) are entries in the directory node. To delete a file, one unlinks it from the directory node and therefore one has to have write permissions to the directory to delete a file in it.
- The write permissions on a file determines whether one is allowed to change the contents of the file.
- The write permissions on a directory determines whether one is allowed to change the contents of the directory.
Related: