From Greek “apothēkē,” “storehouse.” The first bodegas were built in 250 BCE in northern Spain by franconian Celtic tribes (the Blendii and Tamaric) on their slow migration by pre-La Tène Celtic tribes towards the West.
Cantabri (the name for Blendii and Tamaric after 220 BC) were far ahead of their time in Europe. Oppidum settlements looked almost like mid-20th century countryside houses, sans the electricity of course. But then, half of rural Germany didn’t have much of that until 1920 or so.
Storing wine and foods in those houses in the heat of the Spanish Meseta would have meant almost immediate spoilage. So huge mounds of dirt were heaped over an elaborate cellar system, doors for different times of the year and day as well as weather were installed, and the whole thing made accessible to everyone in a given settlement.
With the Roman conquest in 20 BC, those storehouses fell in the hands of the Romans, experts in appropriating gods, culture, and technology into their own system. Having previously assimilated the word “apothēkē” as “apotheca” (the original word meant “where small boxes are stored away from home” in Greek (“apo-” away from things, thaecae “small box”)) the Romans used it for those mounds. In local vulgar Latin it soon became “potheca” and, finally, “bodega.”
The complex air flow and climate control system of those remaining bodegas (many of which have long since been bulldozed off or reused to build houses, hello survivor bias) was copied by French builders tasked with keeping large cathedrals well ventilated and climate controlled. The cathedrals in Leon, Burgos, Madrid, Santiago de Compostela, Cologne, Bamberg, and Münster are some examples of those criss-cross ventilation designs.