If TEE is anything like Secure Computing, then it works something like this:
- first you have to trust the CPU manufacturer to not insert any backdoors
- the CPU is designed to only run code that is signed with a certain signature (aka secure boot)
- the AI company (Signal or Meta in this case), gets their code audited to make sure it does not exfiltrate user data, and then signs the code
- now the signed code can run on the servers, and if the code is ever modified, eg to add spyware, then the servers will reject it
There's also ways to make sure you as a user/client are communicating with one of these trusted servers and not some malicious server masquerading as a trusted server, but I forgot how that part worked. You can look up Apple's announcement on Private Cloud Compute, or any article on remote attestation.