I especially dislike the word "cunt" because, as someone else said, it uses female genitalia as an insult - and usually in a very aggressive way.
I don't think the judge should have used this sort of language. However, I suppose judges are human and must get sick of having tirades of bad language and abuse directed as them by obnoxious individuals, such as this racist man. I think she responded to him in what was probably the only way he would understand.
I don't know if she should lose her job or not but I think there are probably worse things that judges do and they don't lose their jobs.