Coffee has its own Cain and Abel: siblings with opposed personalities sharing the same DNA. Aging is coffee's Abel—the positive, naturally occurring chemical and physical processes that, over time, optimize roasted coffee's aromas and flavors. An opposing process, staling, is coffee's Cain: negative (yet, still natural) changes to aroma and taste, bent on ruining aging's good and vital work—literally killing quality, if given the opportunity. Whether Cain wins comes down to how coffee is preserved after roasting.
The sermon stops here, its purpose to introduce a discussion about coffee packaging—a complex topic that raises lots of questions. The critical factor in coffee packaging is roasting—specifically, the chemical changes that occur during and after the roasting process. Understanding roasting dynamics creates the foundation to understand packaging, and the strengths and limitations of bags and cans. What's more, all bagging methods aren't created equal; same goes for canning. I'll sort out the specifics in a bit.
A green-hued coffee bean picked at the farm is a very different thing from its later, roasted self—what we picture as "coffee." Green coffee beans are essentially composed of water, minerals (mainly potassium), carbohydrates (sugars, mono/poly/olyglycerides), amino and chlorogenic acids, proteins, lipids (mainly triglycerides), caffeine, and a host of other substances like trigonelline, enzymes, and polyphenols—some in minor quantities, but still fundamental. Many of these team up during roasting to create aromas. Other kinds of aromas, called volatiles, with names like 3-isobutyl-2-methoxypyrazine, are present in the raw beans themselves, in large amounts. I'll refrain from giving the full list.