suggests that
drinking alcohol can influence a person's thinking and judgment; the saying also reflects old prejudices about beer drinking.
Imagine a case where beer diminishes the mind; a notion of older times, when beer was the drink of lower classes; then “He that drinks beer, thinks beer” fits well.