In the UK, there is no concept of an "official name". A person's name is simply, whatever name they choose to use and be known by. They can change it or use more that one name in different contexts. Nobody seems to consider this a problem in a legal, employment or social context, that requires us to change to a system of formal legal name, or require court or medical approval of a name change, etc. It certainly might raise eyebrows it's completely legal to do so.
By contrast, to specify a gender one identifies as, or use multiple genders at different times, requires immense scrutiny, must be formally approved and accepted, etc.
There are some obvious possible reasons, but none seem to have relevance today:
Historically, many services and social matters were segregated or provided differently (or not at all) depending on gender. But this is largely historical and tends to be considered discriminatory now. Most public services seem to state as a goal that they provide services as needed to everyone, based on individual needs/presentation (even if they don't actually do so).
Marriage used to be cis-heterosexual only, so it was important to track gender to ensure this legal relationship was valid. But (barring anomalous non-recognition of non-binary identities) this is historical, anyone can marry anyone.
Historically, some matters were priced differently, being statistically different between genders, such as pensions, insurance, retirement, and it was important to know which gender was which. But this is now also seen as breaching equalities law.
Medical needs might be relevant but seem to be a red herring. While a medical provider may well require information on body shape/type, and any matters pertaining to mental /physical health needs, this doesn't seem to have any impact. A person's medical records may need to have body type/shape information, and if relevant, some information on their gender identity or birth biology. But none of this implies or necessitates that their ongoing gender identity must be formally controlled/approved/stipulated to do so. To underline this, the same medical records also contain the patient's name(s), which are far more crucial identifiers, but chosen names don't seem to require formal legal control etc as a result, or in order to be workable in a GP/hospital/services context.
In fact, in UK law, very little is affected by gender identity, and the trend both in law and society seems to be that these remaining differences are reducing.
So is it purely a historical artifact that a person's gender is subject to such scrutiny, external approval, uniqueness (can't use multiple genders), and formal documented stipulation, where their name has none of this? Or is there still a significant rationale why this information is required and so tightly controlled by the state?