No, it hasn't.
That's an after the fact rationalization for preserving the policy invented long after segregation on fairly explicitly misogynistic grounds was established, when the original motivation was no longer something people felt comfortable saying overtly in government.
Preventing assaults (and sexual assaults specifically) in prisons is not a major motivator for the structure of our prison system; if it was, there'd be a lot fewer sexual assaults in it.