do they publicly fund operations for people who aren't incarcerated?
No, Most states consider it cosmetic, and medicaid will not cover it though I do remember that in Washington State they funded a few before they changed the medicaid guidelines.
Medicaid will however cover hormone injections and therapy for individuals with gender identity issues. This inmate is receiving hormone injections and therapy which makes his care similar to those who aren't incarcerated and receiving public benifits.
Public benifits are hard to get in this country. There are individuals with cancer and HIV who can't afford treatment, and don't qualify for public benifits here. I would prefer these people to receice public assistance rather than dishing out 20k for a surgery for a murderer.
Actually, I would prefer our country to abolish private insurance, and provide government sponsered healthcare to everyone, but that is a different subject.