The chmod +a actually sets an ACL that maintains the permissions when the directory is written to. The reason it's being used here is so that files and logs written to by the webserver, user www-data, have the same permissions as files written to by a user on the CLI.