Of course they aren't sub-human, but that doesn't mean this surgery should be paid for.
I know someone who has gone through this. The reason it is sometimes paid for is the theoretical increased risk of suicide without it. However, there isn't much research on the subject, so opinion on whether the treatments (medications, hormone therapy, counseling, multiple surgeries, electrolysis, etc) should be paid for and to what degree varies widely.
I can understand and thought of this, but i feel like there are lots of things which can increase risk of depression and suicide. I can believe that sitting in prison could make some suicidal. I say send him or her to psychotherapy with the prison Psychologist and let him or her learn to be happy with whatever he or she is. Prison isnt a time for free extra free stuff that regular ppl dont ordinarily have access to.