Why do lawyers and judges and possibly others in the British legal system where wigs?

by popwar09

I don't know if this kind of question is allowed here, I'm just not sure where else to ask it.Obviously I'm not from there, I'm from America. I've never heard an explanation for why or how wearing a white wig was/is a normal thing. I assume it's just a tradition now, but I was unaware until rather recently that it is still in use.

Edit: Why do they still do it to this very day

ktoner1017