story
Also, it doesn't tackle spam. The concept that anyone can email anyone would probably have killed email, had it not been largely (if by no means completely) solved -- ironically, this was achieved by all but doing away with federation (email now being a oligopoly of Google, Microsoft and a few more, more or less dictating who gets to send email to whom). Finally, what I suspect was the final nail in the coffin, XMPP didn't play well with mobile (not to worry, an extension, XEP-0286, currently in state "experimental" first published in 2010 is fixing that).
EDIT: I should clarify: XMPP works quite well for private (non-federated) IM-setups. I offer this as an explanation of why XMPP isn't the interoperable email of IM across the Internet, and we instead see Facebook/WhatsApp/Slack/million other incompatible things dominating the space.