Coffee Beans will naturally have their levels of acidity and sweetness. The toasty, nutty or roasted flavors only develop from roasting where sugars from coffee are caramelized;
#TODO https://associatedcoffee.com/blog/how-coffee-changes-during-the-roasting-process/ #TODO https://codeblackcoffee.com.au/blogs/coffee-notes/coffee-module-1
However, the darker the roast doesn’t mean the better the brew as this is a common misconception. The beans should be roasted to a point where the preferred flavor profiles are highlighted and this generally happens between in a light to medium roast.
Pitch-black coffee roasted is usually an indicative of low-quality beans, as the roasting process had no intent of preserving flavor.
The life expectancy of roasted coffee can be anywhere from 2 weeks to 2 months from the roast date, after which the beans starts to go stale and there’s noticeable deterioration in quality, usually in the form of sour, dull/flat flavors.
The expectancy varies across roast profile and storage (oxygen, light, moisture, extreme temperature). Darker roasts release CO2 faster and stale quicker due to the weakening of the beans cellulose structures. Oxygen and light cause oxidation, while moisture might react with the grounds and extreme temperatures will break down important components.