Just like any other maturing industry, brewers banded together to share knowledge, best practices, and to confront labor and governmental challenges. Here’s a nice summary of the San Francisco Brewers’ Protective Association, founded in 1874. It doesn’t have any historical connection to the San Francisco Brewers Guild. (Source)