History of Beer Gardens according to Wikipedia
Beer gardens in Germany developed in the kingdom of Bavaria in the 19th century, during which dark lager beer was predominant. According to a decree by King Ludwig I, this had to be brewed during the cold months, since fermentation had to take place at temperatures between four and eight degrees Celsius. To provide this beer during the summer, large breweries dug beer cellars in the banks of the river Isar, which allowed them to keep the beer cool. To further reduce the cellar temperature, they covered the banks in gravel and planted chestnut trees, the leaves of which provided shade in summer.
Soon after, the beer cellars were used not only to store but also to serve the beer. Simple tables and benches were set up among the trees, and soon the beer gardens were a popular venue for the citizens of Munich. This aggrieved the smaller breweries that remained in Munich. To prevent further loss of customers, they petitioned Ludwig I to forbid that the beer cellars surrounding Munich to serve food. Thus, the patrons were allowed to bring their own food - and this is still common practice.
This decree is no longer in force, and many beer gardens do serve food today. But according to the Bayerische Biergartenverordnung (Bavarian beer garden decree) beer gardens still have to allow their patrons to bring their own food.
The latter beer gardens are called traditional beer gardens. In summer, these can be a convenient way of eating out under chestnut trees in the shade, avoiding restaurants in the upscale city of Munich and Bavaria. They have become an important part of life for many citizens. The Biergärten in Bavaria usually serve common Bavarian cuisine as Radi (radish), Brezen, and Obatzda. If one chooses to buy food on site, other classics are halbes Hendl (half a grilled chicken), Hax'n (knuckle of pork) and Steckerlfisch (grilled fish).