When you query a DNS server, especially for something like an A
record, you don't get a complete picture of all of the set up of a site. You only get enough to satisfy your request and connect to the intended target.
It use to be possible to do additional queries and get full listings, but for security reasons, this has been disabled and deprecated for a long time.
Even before security measures reduced the amount of information you could scrape out of DNS, sites were using dynamic dns techniques to implement load balancing. Basically, when your host queries an A record for facebook, it gets one or a few answers out a large list of unknown size. Your system may cache that result, so subsequent queries give the same answer, although the source DNS server can set a timeout on that (the timeout was around 300 seconds when I checked).
So basically, when you query facebook.com, you get a random answer out of a list, and that answer could change (possibly every 300 seconds). Facebook's DNS servers could easily give a completely different answer to each client that queried them, and could even try to detect your network location to tweak the answer to give a server close to you on the network. As mentioned in the other answer, this is exactly the sort of thing that a CDN is designed to do.