Q:

Why can a person freely change their name, but not their identified gender, in the UK?

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?

A:

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.

Official Gender vs Official Name
I believe the difference is not quite is not quite as large as your question suggests.
Compare

https://www.gov.uk/change-name-deed-poll
https://www.gov.uk/apply-gender-recognition-certificate

The Guide to the Gender Recognition Act says

Under the laws of the United Kingdom, individuals are considered by the State to be of the
gender – either male or female – that is registered on their birth certificates. The Gender
Recognition Act 2004 enables transsexual people to apply to the Gender Recognition Panel
to receive a Gender Recognition Certificate (GRC). If you are granted a full GRC you will,
from the date of issue, be considered in the eyes of the law to be of your acquired gender.
You will be entitled to all the rights appropriate to a person of your acquired gender. This will
include the right to retire and receive state pension at the age appropriate to your acquired
gender.

So we can see that, historically, and for a few years to come, your entitlement to some state benefits, such as state pension, depends partly on your gender identification. This might be a motivation for government processes which regulate official recognition of changes of gender identification.
There are other areas of law that provide rights based on gender. For example, I believe if a place of employment provides toilets for one gender, as soon as a person of another gender is employed, there is a legal requirement that the employer provide gender-specific toilets for them. The law does not, for example, require name-specific toilets.
Although laws are changing in these areas, it is still the case that, in the event of a disagreement among people using gender-specific facilities, voters expect legislators to provide for some legal basis to allow these disputes to be settled by a legal process if all other informal or formal settlement processes have failed.
Entitlement vs Identification.
Generally, entitlement to state benefits is not different for people named Jim to those named Joe - Changing your name does not affect that. This may account for a simpler process. Generally UK society raises fewer objections to Jim wanting to be called Joe or Jo.
Many voting taxpayers consider it is important to be able to accurately identify individuals who are entitled to those benefits - If Jim is entitled to (say) disability benefits, it is generally thought best that Jim's benefits are not accidentally paid to Joe - having an official name is part of that. That is probably one reason why there is an official process for changing your official name.

A:

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.

Untrue. There is a legal name, and this is needed for official contexts.
Beyond that, to address the 'why control' part of the question, the simple fact is that people understand that Names are ultimately decorative. Being called 'David' does not suggest the person has a quality of  'Davidness'*, unlike Male and Female, which undoubtedly do suggest things. This means that they have meaning, and it makes sense to ensure that they do not mislead.
As to why the Government asks for that information - there is most definitely a historical component to this, including cost as the government itself has argued with regards to allowing an X category on passports (a separate issue to changing).   
A last point to consider is that the government records the data on Birth Certificates etc as "Sex" not gender. 
*except some ideas drawn due to the usual context of use, which ironically includes maleness.. 

