Earlier quoted context omitted.
You may not. I don't want my government spying on me. What if I was gay and was seen leaving a gay club? Now what if I ended up in the Kingdom of Saud and that data was shared or leaked?
If you're gay, you should know the risks about going to Saudi Arabia or any place with similar laws and avoid going there. One does not usually "end up" in a different country unless they're kidnapped and at that point the homosexuality laws are really the least of your problems.
The whole "if you don't want to go to jail, don't commit crimes" line of thinking really falls apart when you realize that the legal system is well beyond the ability for a layman to navigate on a day to day basis and gets even worse when you have a perfect surveillance state capable of seeing and storing massive amounts of data.