It would be against Islam for a woman to show herself (without a head covering) to a man she wasn’t married/related to. This isn’t true for woman and other woman. This person is trans and their friend treated them, through religious tradition, that she accepts her friend as a woman.
Which means, in effect, that their friend is saying "My belief that you are truly a woman is at least as strong as my belief in my god," which is an incredibly powerful way to validate someone's identity.