When your health data can say you are trans, and the government decides to persecute you, then yes, it important to maintain privacy.
1. Is transexual but does not tell anybody they are and it is also not blatantly obvious
2. Writes down in a health record they are transexual (instead of whatever sex they are now)
3. Someone doxxes they/them medical records
4. Because of 3, and only because of 3, people find out that said person is transexual
5. And then ... the government decides to persecute they/them
Let's be real, you're really stretching it here. You're talking about a 0.1% of a 0.1% of a 0.1% of a 0.1% of a 0.1% situation here.