"The UKSA and the National Statistician will always refuse to allow it, and will contest the case to the maximum extent possible under the law, using each stage of appeal in the Courts if necessary, in order to ensure statistical confidentiality; and will do so in an open, public and transparent manner, to the extent permitted under the law."
So those two "extent permitted under the law" clauses, means that the government can do it and hide the fact that they are doing it using appropriate legislation.