They are making a point that gender is something in one's own mind. It's not necessarily genetic.
Sex is not changed with surgery. Surgery allows the person receiving it to have a body that matches more closely with what they want to feel like (their gender). No different than people getting breast implants or reductions or labioplasty or plastic surgery or dick enhancement.
Most people have a body/sex that fits their preferred gender which is why this feels weird to some people, especially the ones that can't or won't reason through this. They make snap judgments with previous biases or prejudices which is an unfair and somewhat bigoted position to take.