I'm not sure what the main reasons for segregating by bio sex were, but I can think of a few and none apply to gender identity.
Maybe the most important is you don't want prisoners getting pregnant.
Maybe the most important is you don't want prisoners getting pregnant.