I think laws against being gay are wrong, but I have to disagree with your argument that they are laws against existing. You can be gay "inside" but never act on it. That should suffice for you to not get "punished".
Besides the fact that these are terrible conditions for a population to live under, I'm not sure you realise how gay people can be perceived and persecuted in these countries, for those visiting for the world cup I can imagine a lot of problem scenarios.
A couple might try to stay at a hotel in a room together, but because they are both men it could suddenly become a serious problem. Maybe they aren't even a couple and are two friends trying to get a cheaper room, but they get arrested and have to prove they are not gay.
A couple might want to enjoy dinner together at a restaurant, maybe that becomes a problem.
A couple might have "incriminating" pictures on their phone and be arrested.
I don't know how it is in Qatar, but I've been to Russia with 2 other men (all heterosexual) and we stayed in the same room which had only one king-sized bed and a separate, single bed. Two of the guys slept on the king-sized bed (which was big enough for them to not get too close for comfort) but I suppose a gay couple would've been quite happy with the arrangement. No on asked us if we were a gay triangle or something... the hotel was very luxurious so that's all we could afford with the company credit card :D. I am mentioning this because I believe Russia has laws "against gays" similar to Qatar (not sure how similar) but the laws, at least in theory, are about "promoting homosexuality" or something on those lines... I think being openly gay itself is not a crime except in very few, extremely relegious countries, and it's only when you're seen as promoting your lifestyle to others that it becomes unacceptable to them (and I suspect a lot of people in the West would actually agree with that). I suspect, however, that you're right you may get into trouble if you display affection to same-sex partners in public in Qatar... but that may be harder than you think given how in many muslim countries, it's common for men to kiss each other in the cheek... I guess that with some care, you may be seen just as unusually close friends.