First, as I am often in a position to argue, a crime is still a crime, even if the victim of that crime is, himself, a criminal. A murderer is no less guilty if his victim was a thief, a drug dealer, or even a fellow murderer. As for rape, it is still both criminal and wrong even if the "victim" is a convict serving time in a penetentiary.
So, why aren't more prison rapes prosecuted? Evidence. You need evidence to prosecute any crime. Rape is especially difficult, as you must prove the absence of consent, in addition to the sexual acts. In the prison setting, witnesses are difficult to find, out of a valid concern for their own safety. Victims often don't report, for fear of something worse the next time. Or, sometimes, they don't report until later, after the physical evidence has been damaged or lost.
Now, as for the corruption and randomness of the criminal justice system, I can say that for 10 years, I have been a prosecuting attorney. And, if the system is as corrupt as some people say it is, well I feel cheated, because I haven't gotten anything more than a paycheck every two weeks, some fringe benefits, and about 2500 rounds of training/qualifying/duty ammo. WHERE"S MY BRIBE MONEY?