All of the best foods are fermented: bread, cheese, wine, cured meats, sauerkraut, and of course beer. Fermentation occurs when yeast converts sugars into acids, gases, and/or alcohol, depending on your (and more so the yeast or bacterias) intended outcome. Food artfully coerced into controlled decay to transform into complex delicacies. Wheat dough comes to life with expelled CO2, sugary wort infuses with bitter alcohol and natural carbonation.
Cabbage when dehydrated with salt will create its own fermentation environment. A natural bacterium on the outside of the vegetable infects the water expelled after salting, dropping the PH and increasing the acidity so that only it is able to survive. It is then free to happily digest all the sugary enzymes it wants without competition. Bacteria is a wonderful ally in a world of bratwurst and schnitzel.
Beer just so happens to pair well with all of these fermented delights. Sauerkraut and sausage with a German Oktoberfest is a pillar of culinary perfection. Just about every style of cheese can find a partner, Geuze beer and goat cheese, Belgian Tripple and brie. Beer, at its essence, is grain fermented in barrels. Cheese is grain (often the same varieties) fermented in cow stomachs. The tastes and flavors that came out of the fermenters have stayed with humanity ever since this beautiful decay was discovered. Although the methods have vastly diversified, giving us endless variety and style, the basic principles are still there. It is valuable to note that anyone can capture this magic with a few tools of the modern kitchen and an internet recipe.