Matrix is not really a chat system, but rather a distributed database that pretends to be a chat system. As a result all servers participating in a room get a full copy of the room metadata all the way back to when the room was created, which is a serious privacy issue.
This is not a general problem of federated systems though, and XMPP for example basically only shares the metadata that other participating servers strictly need to function.
How…do you think chat systems with storage are supposed to work? They store data. In a database
What specific fields are shared by matrix but not xmpp?
Yes in a local database, not a distributed one.
The main difference is that XMPP (like most other federated systems) is based on passing messages, so if a new server joins a chat, it gets send messages from that point onwards.
In Matrix that is different. When a new server joins a chat it exchanges the entire database for that chat, and for DAG consistency reasons this means all the metadata since the chat was first created, often years ago.
The main difference is that in Matrix, a chat’s history and media is stored indefinitely on every participating server, while on XMPP it’s only the duty of the one “hosting” it. And to my understanding, in 1-to-1 chats, the server doesn’t even retain the messages after delivering them, since there’s a separate module for “syncing” the history between devices (that you can set the retention time for).