Sex is more complicated than XX or XY. For example, there are numerous women who are actually XY and don’t know. A number of Olympic athletes have had this condition and never knew it until they were tested when they were about to compete in the Olympics. They look like females and feel like females, but they have a Y chromosome rather than two Xs.
Then there is Klinefelter’s syndrome (XXY) and XYY syndrome, as well as a few other rare conditions such as XX males.
Then there are the people who appear to have normal chromosomes, but have simply always felt that they were a woman trapped in a man’s body, or vice versa. What causes this isn’t fully understood, but it is very real and definitely not a choice these people make. If you think it’s sinful to have surgery to deal with that situation, then I guess you’re certainly free to think that, but I don’t think you know what it’s like to actually feel the way these people do.