I guess they are saying all of the Gitlab code is MIT and all of the Mattermost code is AGPL. That's perfectly permissable by both MIT and AGPL licenses.
In practical terms, you can take the Gitlab/Mattermost distribution and modify the Gitlab code without having to release your changes. But if you modify the Mattermost code, you need to release the changes you made to the Mattermost code.
No, if Mattermost and Gitlab were linked, the AGPL restrictions would apply to the Gitlab code, even if it's MIT licensed. Otherwise, anyone would just be able to make a MIT-licensed wrapper around an AGPL project, allowing indirect linking between proprietary code and AGPL.
What Mattermost apparently did was compile their own code (under the name "Gitlab Mattermost"), and distribute that compiled version under MIT, so there's no AGPL in the Gitlab distribution.