Unlinking `access.txt` from the directory is not a change to `access.txt`, but a change to the directory, so user2's write permission on the _directory_ is what is relevant.
The write permission on the _file_ would be of interest if user2 wanted to modify the file, rather than the containing directory.