It's because the thing that makes you trans is that your brain developed as the opposite sex to your physical one. If you're MTF, you have a female brain, if you're FTM, you have a male one. It's also possible to end up in a situation where some of your brain development has occurred as male and some female (which is what appears to have happened to me).
Contrary to popular belief, the thing that causes you to develop as male or female isn't X and Y chromosomes. Instead, it depends on hormone levels during the time your prenatal development is taking place. If there are high levels of androgenic hormones present (primarily testosterone and DHT), you'll develop as male. Otherwise you develop as female. All being XX or XY does is determine whether you develop ovaries or testicles, everything from that point onwards is driven by hormones.
This is easily demonstrated by conditions such as Swyer's Syndrome and Complete Androgen Insensitivity Syndrome (CAIS), which cause genetically male (XY) people to develop as female. With Swyer's, this is because the testicles fail to develop, so no testicular hormones are produced. With CAIS, the testicles do actually develop and produce their hormones as they should, however the condition involves a mutation to the gene for the androgen receptor, which renders that person completely unresponsive to testosterone and other androgenic hormones, so all their development takes place as if those hormones weren't there. In both cases you end up with a person who is genetically male, but female in both appearance and behaviour. Despite their genetics, people with these conditions appear to be completely ordinary women, to the point where the condition often isn't even spotted until, as teenagers, they fail to start menstruating.
Because the sex you develop as depends on hormone levels during the time your prenatal development is taking place, and because hormones aren't binary, but can exist on a spectrum ranging all the way from low to high, it means that sex itself isn't binary, but exists on a spectrum. Admittedly, the majority of the population are fairly close to one end of that spectrum or the other, but there are a minority of people, who experienced atypical hormone levels during their prenatal development, and who've ended up gender blended as a result.
One of the things that can happen in that situation is that your body develops in line with your genetic sex, but your brain develops along the lines of the opposite sex. This is because genital development takes place during the first trimester, whereas the permanent connections between cells and the permanent structure of the brain don't start being built until partway through the second trimester (from about week 16 onwards). If you have hormone levels typical of your genetic sex for the first 16 weeks of your prenatal development, but more typical of the opposite sex from 16 weeks onwards, you'll end up with a female brain in a male body or vice versa. It does appear to be genuine opposite-sexed brain development too, right down to the way the brain tissue responds to hormones (this is one of the things they found in the animal research, and the psychological relief many transgender people seem to experience on starting HRT bears that out).
Basically, if you have a female brain, it's expecting female typical hormone levels in the blood it's supplied with, whereas a male brain is expecting male-typical hormone levels. If you supply your brain with the wrong hormones, it makes you feel awful, and probably leads to depression and other psychological problems too.