Sometimes I accidentally grind a bit too much coffee, and even an hour later the left over grounds already smell quite unpleasant, like stale coffee that's sat out too long.
It makes sense, though. Why do we grind coffee to brew it? To maximize the surface area and exposure to the water. That same increased surface area causes it to react with the atmosphere much more rapidly than whole beans.
I did an experiment with this (and you can, too!), comparing the same beans ground 5 min, 2 days, 4 days, and 6 days before brewing. The freshly ground beans were the clear winner.