This is indeed caused by System Integrity Protection (SIP) in El Capitan, but another answer is erroneous in the fact that they stated that /usr/local is still able to write or that you can restore permanent access to it.
This completely confuses my homebrew installation every time I install a new program, and I have to chown -R username /usr/local at least once a week. SIP has several different command line options that you might need to completely or completely disable it (which I definitely consider) or just disable its parts.
Note that disabling / enabling / changing the system integrity protection should be performed in single-user mode, rebooting into recovery mode, holding Cmd+R pressed and then starting the root terminal and executing the csrutil command, which takes several parameters, namely disable and enable , but also options that only partially disable SIP for specific things (which are not specified at all in the csrutil --help dialog box). You will also need a reboot for the settings to take effect.
source share