The short answer is that when you grind coffee beans and then make a cup, or pot of coffee, you are allowing hot water to pull out (or extract) a bunch of the tasty stuff that is within the bean. The longer all those tasty components and oil from inside the bean are exposed to air, the more stale and "flatter" the cup of coffee will taste. Thus, freshly ground = tasty + not stale.
The longer answer includes oxidation and moisture (and an even longer answer includes CO2 depletion and flavour absorption, which we will not get into today).
You know that amazing smell that arises when you grind coffee? Well, that is the result of compounds within the bean reacting with air to create new molecules, some of which are pleasing flavour and aroma compounds. Essentially, as soon as those grounds meet air, oxygen begins sucking flavour from the coffee grounds. Thus, we do not want to allow oxygen to have access to ground coffee for too long.
The oils in coffee beans are water soluble, and these oils contribute mightily to a tasty cup. This is largely why old, dried out coffee beans make for a terrible cup of coffee. You want those oils, and when you grind up the beans you are creating all sorts of surface area for those oils to be dissolved and absorbed by water. But, it is not just the hot water you are using to make your cup that will do this - the moisture in the air will also absorb the oil and over time, will leave little oil for your cup of coffee.
While we readily acknowledge the role that pre-ground coffee has in busy lives, to experience the true depth and flavours that specialty coffee has to offer, we recommend investing in a solid grinder and making it a part of your coffee routine.
If it doesn’t fit into your weekday routine, no worries. Take the time on your days off to grind your own coffee fresh, slow down, and spend a while sipping, savouring, and discovering all the differences and nuisances a freshly ground cup can hold.