Is this not just because most rapists are men (and sexual assaulters more generally are men), and the only people they can rape in a prison environment are other men?
Which is also why prisons are segregated by sex, to avoid women prisoners being sexually assaulted, raped and impregnated by deviant men. If prisons had no such sex segregation, it would overwhelmingly be the women being raped, not the men.