For those who haven't been following UK politics, there used to be an EU-wide law doing this. That law was created and pushed for by a previous UK government, and the reason they did it as an EU law rather than a UK one was to avoid all the pesky democratic accountability involved in passing UK laws. The ECJ recently squashed the existing law, so they tried to sneak a UK one in by not telling most MPs about the vote and got publicly rumbled by Tom Watson MP last night.