The fundamental reason is that you may want to use the same domain name in different ways for different services. Ie, the domain part of an email address may also be used for something else than just incoming email.
Eg with foo@example.com
, you may want to have address records (A
/AAAA
) for example.com
that are used for something else than the SMTP server. Maybe a web server, maybe something else, it doesn't really matter what exactly.
That said, if no MX
is present, then the standard is to fall back to looking up address records and using those also for email delivery.
Sidenote, if this was all designed today, MX
would actually be redundant as SRV
was later introduced as essentially a generic form of MX
that can work for any service.
With SRV
you specify which service type should be mapped to which host, rather than having a dedicated record type for one particular type of service like with MX
.
Additionally, http client such as web browsers would presumably also use SRV
instead of just looking up address records if SRV
had just been around earlier, which would actually be quite nice. But that is not what we have, and so far no change is happening in that regard.