why should some unelected non-UK people have a say in whatever laws the UK wants to pass for the UK?
Because you agreed to that in the 50's? Anyway, in this particular case, it is because the UK court of appeal (nominated by lawyers) asked for an opinion from European Court of Justice (nominated by governments). ECJ is of the opinion that the law as it is violates the human rights and privacy of EU citizens.
If the UK court agrees, and rules accordingly, then it's possible to challenge the snooper's charter in UK courts. Case by case.
That's all it is. Self-nominating bunch of layers asked the opinion of representative-nominated lawyers about the agreement of two sets of rules. Hardly the unelected overruling the hapless britons...