If she has reported a rape surely the police understand that this was not her choosing to have extra marital sex? Or do they not acknowledge rape in Dubai?
I strongly suspect that her lack of intent doesn't matter to the law there and, yes, they do not acknowledge rape unless witnessed by two men of good reputation. (I remember that men's testimony counts twice as much as women's in those countries, which means that in a rape case, the man will automatically win, since it is highly unlikely that two decent men happen to witness everything without interfering.)
That, or they claim that her reporting the rape was an attempt to deceive them.
When dealing with misogynist males and governments, you have to let go of your preconceived notions that laws are, by their nature fair or just.
Where there is misogyny, common sense no longer matters.
Dubai is not a civilised place.
Nor is Germany, but there are degrees of lack of civilisation ...