Oh, yes... VERY helpful for foreigners. Especially those who are not interested in learning the local laws and customs, or making any effort to blend in with the rest of that society.
If a German were caught stealing in, say, Saudi Arabia, do you suppose they'd invoke international private law - or simply lop off the suspect's hand?
Stealing is a crime, not an issue of civil law. But if a German married to a German wants divorce in Saudi-Arabia, the Saudi judge has to apply German law. I´m not sure he knows that, though. ;-)
And regarding the actual case: it´s not a case of IPL, because the woman is a German national. So, the judge made a terrible mistake by using the Koran instead of the German constitution. The German public is outraged, and the judge was pulled off from the case. Many politicians call for disciplinatory measures and even the dismissal of her.