Eh, it IS hard to enforce that. Just because, like I said in my previous post, it's society.
Look, let me give you an example. Have you ever bullied/been bullied in school? Or have you witnessed bulling? Is it allowed? No. And it's punishable. Does it still happen? YES. Society.
In an Utopian world that law you mentioned would be easily enforced, heck it wouldn't even be needed in the first place.
But the world of Skyrim (and its society) tries to be realistic at least in regards to the inter-human relationships that develop within a community.
There will always be some Nord that will bully the Dunmer, despite all the laws.
That is quite true but don't forget that despite similarities, TES universe and it's society is a whole lot different from our own. Not just because of hum-animal species, sentinent trees, elven folk living for thousand of years (that's seriously a sh*tload of time) but because of social mechanics. True, not even Talos himself could eradicate racial bias and hate but that dosen't mean it's not worth fighting against. If we take your example then the good approach would be:
a, The aggressor needs to be reminded that such behaviour is unacceptable and won't really achieve anything. If the subject knows no other method to solve problems (inadequate social background), teach them. Speak. Negotiate. You can reason with an Altmer just as much as you can with a human. It's not the race that causes the problem but the individual's stubborness or lack of proper upbringing. I'm sure we all know reasonable humans and absolute douchebags as well, despite sharing (mostly) the same ancestry.
b, If the above mentioned dosen't work then comes punishment. Within our norms this could be all sorts of things depending on the severity and frequency of the crime, as well the age of the accused. In Tamriel it probably means a good, hard, old-fashioned beating. Nevertheless, if the aggressor can't be convinced to stop their behaviour then it's safe to say that society does not need them. IRL getting justice is becoming impossible to do with bureocracy infesting everything. In Tamriel -even if there IS a corruption among the high ranking nobles- justice can be achieved one way or another.
It's certainly a cause worthy of pursuing. Maybe I could make a Dragonborn and RP just that. Captain Vigilante to the rescue!