To understand HTTP's Vary behaviour we first must understand how the CDN works in the traditional sense of caching and looking up resources.
Note: at the bottom of this page is a sequence diagram which visually illustrates how Vary works (if you prefer a more visual aid).
The CDN caches requests based on a given pair of Host and Path values. So when the CDN accepts a request, as an example, for the resource
https://www.buzzfeed.com/videos the CDN will take the Host (e.g.
www.buzzfeed.com) and the Path (e.g.
/videos) and generate a hash of those values which will become the 'cache key'. Later when the CDN receives the same request from a different client it'll generate the same hash and lookup the resource in its cache using the hash as the key.
Depending on the client, the origin server that generates response content (which will be cached in the CDN) may well want to serve different content for different clients