Re: "wanted to put the UK's position "beyond doubt."
Please remember that EU legislation, although providing a template for national laws, is not directly enforceable in the member countries. This is because we are not the United States of Europe, at least not yet, not until Jean-Claude Juncker starts pressing for closer European ties.
A directive is passed in the EU parliament, and then that directive has to be enacted by each country's parliament in their own national legislation, which then becomes law in those countries.
The converse is true. If an EU directive is overturned, then that does not automatically mean that the national legislation is also overturned. In the UK, this requires a modification of the national legislation, which means action in the UK parliament.
Between the EU directive being deemed invalid, and the corresponding changes in a country's national laws, the government of that country can be taken to one of the European courts for not complying with EU law, but that is unlikely to happen in the short-term, because there is a reasonable amount of time allowed for national laws to reflect changes in EU directives. What is reasonable is open to debate, but can be several years.
So what this means is that the existing UK legislation was still effective, and would be until amended, something that could have waited until the next term. This latest knee-jerk reaction was not required, so there really must be something hiding in there that Mrs May did not want examined too closely!