DNS is indeed being used for load balancing, not HA. However, piggybacking on the parent’s example of Google, they actually achieve HA on the IP level.
They have multiple data centers broadcast the same IPs using BGP, and if one goes down Dijkstra’s algorithm will re-route to another data center that listens to the same IP.
Having said that, I actually think that using multiple MX records for HA is a very elegant and robust solution for mere mortals that do not own multiple data centers and their own AS. Server side HA is way more expensive to get right than client side HA, and if it’s important for the protocol (which, in the case of email, it is), you better make damn sure it’s not expensive to implement for service providers.
Look at the node.js code for example: https://github.com/nodejs/node/blob/master/lib/net.js. Look for "lookupAndConnect".
The high-availability responsibility has been moved to the server side.