The law has been proposed by the European Commission who is just nominated not elected.
We don't elect governments over here, just Parliament and President.
Being able tho propose a law is not ther same as enacting a law, and is not the same as applying a law which is what the parent comment said.