Picture a news site whose homepage trending-stories block is cached in Redis with a 60 second TTL. The page gets 30,000 requests per second. For 60 seconds Redis answers all of them and the database is idle. At second 61 the key expires.
Without protection, the next batch of requests, say 6,000 of them in the 200ms it takes to run the trending query, all miss Redis and all fire the same heavy aggregation query at the database. The query is expensive, the database chokes, latency on every endpoint spikes, and the homepage may error out entirely.
With single-flight coalescing, only the first request acquires the lock and runs the query. The other 5,999 requests see the lock, wait a few milliseconds, and read the value the winner wrote back. The database sees exactly one query. With stale-while-revalidate layered on top, even that one winner does not block readers: the old trending list is served for a few more milliseconds while the refresh completes in the background. The stampede never happens.