You were very hasty is squarely laying the blame on them - something was very fishy about this story in particular the speed at which they were sentenced. I did check in with some significant contacts on the ground and they were really shocked this has happened because there are plenty of effeminate Arabs from neighbouring states who descend upon the UAE and nobody really bothers because its not really a big issue (as long as they are not bonking publicly). It is not uncommon for them to marry young impregnate the missus and carry on with their preferred form of fornication.
After reading the interview below, it does cast a very different perspective on what happened and it is not as the media played it up necessarily.
Now bear in mind, the "policeman" was not necessarily a national. There is usually an assumption that just because someone is wearing the national dress they must be a local. Well it certainly is not true and you have overzealous non-Emirati Arabs doing it all the time. Only those who have lived there long enough or worked with these types regularly can tell the difference (just like tourists or expats will not be able to readily PRCs or Malaysian Chinese or Indonesian Chinese from local singkies). Other than Saudi Arabia and Yemen, none of the Gulf States have sufficient numbers to make up the forces they need and they import these from neighbouring Arab states who then take it upon themselves to be guardians of morality. The locals very rarely bother about such matters. I am willing to go as far as to guess than this policeman was either Egyptian or Sudanese. Sheer bad luck for these two but they are lucky to have gotten out just as quickly being they are not related to anyone significant. Really a case of wrong place at the wrong time. And it could happen to anyone whether you are a visitor or working there on the ground. The locals rule but they tend not to be abusive - its the self-righteous masquerading as local types that are the real assholes.