It took until until the 17th century for bottled beer to become commonplace. Up until that time most beer was consumed by pouring it directly out of a cask. Along with advances in science in the later 19th century such as pasteurization and mechanical refrigeration the inevitable march towards tightly controlled, factory produced, mass made and marketed beer had begun. Filtering, pasteurizing, adding controlled amounts of carbon dioxide, and packaging in bottles eliminated the natural variability of cask beer, and the extra care that was needed to properly dispense it. Modern keg beer is identical to bottled beer except that it is pushed to the tap faucet from the keg using a combination of compressed carbon dioxide and nitrogen. The first kegged beer in England was introduced in 1936.
Casks were constructed out of wood until the 1950’s when the use of metal (mainly stainless steel) became widespread. The advantages of metal casks are many: they are airtight which slows the oxidation and spoilage of the beer, stainless steel is also easier to sterilize, is flavour neutral, and is a lot more durable than wood.