Unless you have some experience of the prison system, it is entirely impossible to imagine the total absence of control within in our prisons. And this means they do not, and cannot, protect vulnerable people. Given that a large proportion of the prisoners (of either sex) are vulnerable through deprived upbringings, lack of literacy, and mental health problems, this means that the population within the prisons is open to abuse day in and day out.
The prisons are run by the drug barons - really, I promise you this is true. I have a very dear, but mentally and physically damaged, adopted relative in a prison where the authorities openly admit that they cannot protect that person from being sold drugs and being beaten up if payment is not forthcoming. Their attitude is that this person should request a move to another wing ("Like everyone else does") - the idea of protecting that person in the first place seems to have escaped their twisted logic.
No prisoners are safe; and there is no way that a transgender rapist in a women's prison will be sufficiently monitored to make the women safe. The whole system is broken and in disarray.
The mass of mentally ill and damaged people in our prisons says something about our mental health services and welfare systems. Something of which I feel ashamed.