Good question. I think it has to do with the metabolic processes that go on in breaking down certain compounds. It's the same principle as curing in tobacco or aging in wine. Here's a brief explanation of curing tobacco which I think is the same principle.