Google temporarily stores select message details for the purpose of improving spam detection. However, persistent identifiers like names or phone numbers are avoided to ensure user privacy during this process.