Bathrooms as Citadels of Privilege
What is it about public bathrooms with some people? Like it's the Citadel of Privilege in which they have a sit down.
From a sociological/anthropological perspective, it makes a kind of sense that bathrooms would be a place where anxieties about transgressing established cultural boundaries (including the boundaries that give one group privilege over another) would run high. Many cultures*, including especially modern North American culture, have a nature-culture distinction as a core theme. We set ourselves up as supremely cultural beings. This creates a tension with the fact that we obviously still inhabit natural bodies, bodies which have to do things like poop. Confronting this natural side is dangerous, because it can overwhelm and embarrass our cultural pretensions. There are a variety of ways to manage this tension, one important one of which is to shift natural functions to "backstage" areas such as bathrooms, where they can be handled outside of the main stream of social life**. (This is probably why many people find it so uncomfortable to talk to others while in the bathroom, and some people's bladders lock up if they know others are in the bathroom with them -- it's a mixing of frontstage social activity with backstage bodily functions.)
A bathroom, then, is both a place of relief and a place of vulnerability. You can go take care of functions that were threatening to upset your cultural performance out in the frontstage area. But you're also in a place where "natural," animalistic activities are given freer rein, outside of the constraints posed by culture. This makes you acutely aware of other sorts of cultural transgression. In particular, the bodily location of the excretory organs right next to the reproductive ones makes sexual transgression a particular worry in the bathroom context. Hence predatory stranger-rape is highlighted as a concern, since even in a culture that excuses rape in many of its manifestations (e.g. accepting the "she was asking for it by wearing that miniskirt" defense), predatory stranger-rape is held up as an archetype of violating social norms.
If your culture also contains a strong gender division norm along the lines of "a person born with a penis is a man, and a person born with a vagina is a woman, and that's all there is," then the presence of a trans person in the bathroom is going to trigger a high level of anxiety about boundary-blurring and nature spilling out over culture. (To be clear, my point is not that trans people are more "natural" or represent some kind of revenge of nature -- just that they're interpreted that way in a culture that has adopted the particular norm of cis gender dualism.)
Thus, the price of allowing the necessary but anxiety-creating relaxation of cultural norms like "don't drop your pants and poop" is frequently careful adherence to other cultural norms, which in a privilege-based culture will turn the bathroom into a "Citadel of Privilege."
*I'm dodging the Ortner/Srathern debate about whether and in what way we could say "all cultures" here.
** Obviously hygeine is a consideration here too -- my claim is that bathrooms serve a cultural function in addition to their hygenic one.