The alternative would be to treat prisoners as victims of their upbringing, but that raises questions about the degree to which it's possible to reverse someone's early emotional trauma. For some crimes (e.g. drug addiction) that may be a better approach, as seen in more progressive countries like Portugal.
I actually think that sterilization is an incredibly important tool in terms of family planning and should be offered for free to all interested and consenting adults. But prison is probably the worst place to offer it, because (especially in the U.S) it is a place of coercion that precludes meaningful consent for a non-reversible non-life-saving medical intervention. Like other attempts to use sterilization to solve social problems throughout history, it would just contribute to trauma under these circumstances, not alleviate it.