There is more to the relationship of beer and chocolate than similar tastes and indulgences. Both of these fermented foods came out of the murky centuries of the ancient past. They were invented prehistorically; most of what is known or, more correctly, speculated about the original creation of the two is gleaned from scraping pots dug up at archeological sites. We can only guess how they originally came to be and who first discovered them.
Beer is a complex thing to make. It takes many steps to get from barley to lager or ale. First, the barley must be malted, a complex process in itself. Once malted and dried the barley is mashed in a hot water bath at a precise temperature then cooled again. Finally, the water from the mash is ready for fermentation which results in beer. Looking back through history with our modern eyes we can only speculate how the first ancient brewer found her way from one of these steps to the next.
Chocolate production is similarly complicated. The cacao tree produces large pods that contain the beans. These beans are fermented, dried and then refined to produce chocolate as we think of it. In 2007, archeologists studying artifacts from Honduras concluded that chocolate may have originally been an accidental byproduct of brewing a form of beer. It seems that brewers were using cacao pods as brewing vessels. When they were done with them, the brewers typically threw the pods out as trash. But some enterprising soul discovered a bitter yet tasty substance in the pods. They used this as the basis for a hot, frothy, nonalcoholic beverage - in other words, the first hot chocolate drink.
Whether or not brewers accidentally invented chocolate is impossible to say with one hundred percent certainty. What can be said for certain is that chocolate and beer are among the earliest processed foods, making them historical partners.