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.
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.