Doctors are allowed to make judgement calls within whatever rules the insurance providers and laws give. The status quo before all this was that gender-affirming care was never covered, which changed to always covered in discrete steps across the 2000s and 2010s. Doctors didn't get to decide that on their own. Before that even, medical schools instill rules and values that come mostly from the outside, while the medical knowledge and experience is from the inside.
Another controversy is physician-assisted s–... euthanasia. Some doctors would consider it medically necessary, but they can't legally perform or even recommend it, as it's considered murder. They can in Canada. Abortion of a viable fetus not threatening the mother is illegal in all 50 US states, but legal in many states in earlier stages, again based on what the states consider murder (but the doctor judges what is viable or a threat to the mother).
Anyway if gender-affirming care is just medically desired but not medically necessary, the sterilization is accepted but not necessary. I agree with the spirit of the wording, even though it's imprecise, because it highlights that children are taking on an irreversible side effect. It's a short quote and not a whole essay where he gets to clarify.