Users will require access to certain system level areas in order to run certain software. For instance the
/var/run/mysqld/mysqld.sock has to be accessable for them to be able to interact with databases.
/var/run in general has run-time data such as unix sockets and pid files.
/var/lock contains lock files to allow software to prevent read/write collisions etc and to allow exclusive open of files (file locking etc).
The /var/lib/php5 has a very special file access mode - 1733 - the 1 at the beginning is important:
1000 (the sticky bit). See chmod(2) and sticky(8).
man sticky we get:
A directory whose `sticky bit' is set becomes an append-only directory,
or, more accurately, a directory in which the deletion of files is
restricted. A file in a sticky directory may only be removed or renamed
by a user if the user has write permission for the directory and the user
is the owner of the file, the owner of the directory, or the super-user.
This feature is usefully applied to directories such as /tmp which must
be publicly writable but should deny users the license to arbitrarily
delete or rename each others' files.
What that means is that it is a special security mode which allows a user to create or edit files in a directory, but only the owner of the file itself is able to delete it.