That's not quite true. Most beans should be given at least 24 hours rest after roast. Many African varietals need 48. That's the time it takes for CO2 in the beans to degas.
As for after grinding - you can't really expect it to produce a decent extraction even _ten minutes_ after grinding.