A lot of census related stuff is planning. This includes monitoring the fertility rate and the likely number of children to be born in the next 10 years. So you can build the right number of schools, maternity wards etc.
In this respect sex is quite important because its about reproduction. Reproduction is reliant on sex.
Indeed the 1911 census is interesting. The government was concerned about the fertility rate so required all married women to specify how many children had been born to the marriage. This included saying how many children were still alive and how many had died.
There is a historical point. And there is a point about how and why we use services.
There is a point about monitoring change. We can not do this if we use new definitions. It becomes impossible to compare data sets. We can no longer see changes from 1911 etc.
This doesn't me we dont record trans identity. In fact its important it is monitored - but is monitored correctly to reflect sex.
If we don't how do we build for trans specific services (like need for medical services) or monitor how many people are 'out'?
This is such self defeating bollocks that is being argued in court.