I recently turned off Teacher access to Student email addresses using Site administration > Users > Permissions > User policies > Show user identity field. (My thinking is that GDPR Article 25, Data protection by design and by default, requires this approach, since Teachers can communicate with students via Moodle, without knowing their email address.)
However, I then discovered that if a Teacher exports course grades to a file, the email address is still included in the exported data anyway, which seems incorrect.
It turns out that the Site administration > Grades > General settings > Grade export user profile fields field controls what data is included when exporting grades. This setting seems to take precedence over the Show user identity field, though it should be the other way around, I think.
Administrators control both fields, but many might think like me, and believe that setting the user policy does enough to implement a desired policy.