Gender transfer may be a legitimate medical condition, but the medical procedure is elective. Somewhere in the judge's ruling should be a discussion and rationale for why the state is liable for elective procedures. Many health insurance policies don't cover medical procedures if they are defined as elective.