@Sonaldo
Not everyone is able or willing to have surgery. And consider the problem of someone who's been on HRT for a long time and look perfectly feminine (or masculine in the case of transgender men) but their ID doesn't match their appearance or looks. Now consider what kinds of problems that might make for them if someone sees that mismatched ID. It doesn't help that a lot of people are still not very accepting of transgender people.
Plus having a piece of paper say that you're a gender you feel you aren't can be a cause of mental distress for transgender people. Imagine if your documentations got your gender wrong and the only option to change it required a very expensive surgery.
Not to mention other issues with Japan's treatment of trans people, for example if you're a transgender woman and you're married to another woman, if you update your documentation to say that you're a woman, you are forced to divorce your wife. A manga by another transgender woman discussed the author's decision not to change her documentation after her surgery because she wanted to stay married to her wife.